From 33da8c5b3a873a1095ebfa37d926550950bd771b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 20 May 2021 10:53:53 +0200 Subject: [PATCH] ANDROID: GKI: genksyms fixup for efed9a3337e3 ("kyber: fix out of bounds access when * preempted") Commit efed9a3337e3 ("kyber: fix out of bounds access when * preempted") is in the 5.4.120 release, which causes a CRC issue for genksyms. Work around this by just papering over the difference when the crc checker parses the files. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: Ib1371d0319797cf9e56110ecb8ef4116870ee777 --- include/linux/elevator.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 61f14e7230ff..050e5a1ebbbd 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -35,7 +35,19 @@ struct elevator_mq_ops { void (*depth_updated)(struct blk_mq_hw_ctx *); bool (*allow_merge)(struct request_queue *, struct request *, struct bio *); +/* + * CRC "preservation" hack + * + * This is due to efed9a3337e3 ("kyber: fix out of bounds access when * preempted") + * showing up in 5.4.120. It does not actually change anything relevant, but + * the CRC check goes crazy because of it, so paper over it by keeping the old + * signature for when we do the check. + */ +#ifdef __GENKSYMS__ + bool (*bio_merge)(struct blk_mq_hw_ctx *, struct bio *, unsigned int); +#else bool (*bio_merge)(struct request_queue *, struct bio *, unsigned int); +#endif int (*request_merge)(struct request_queue *q, struct request **, struct bio *); void (*request_merged)(struct request_queue *, struct request *, enum elv_merge); void (*requests_merged)(struct request_queue *, struct request *, struct request *);