From: Dan Duval Date: Wed, 8 Jun 2016 20:55:48 +0000 (-0400) Subject: fix kABI breakage from "blk-mq: fix race between timeout and freeing request" X-Git-Tag: v4.1.12-92~110^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d17e724b395f17024e16740406b59fef23a718c5;p=users%2Fjedix%2Flinux-maple.git fix kABI breakage from "blk-mq: fix race between timeout and freeing request" Orabug: 23521058 Commit 21d62f6 ("blk-mq: fix race between timeout and freeing request") added the element "orig_rq" to struct blk_flush_queue. This broke kABI. The existing blk_flush_queue structure has "holes" (padding) of 4 bytes plus 29 bits. This is not enough space to contain orig_rq, which is 8 bytes long. Currently, this data structure is only used by the block-device code. It is unlikely that a third-party module (e.g., a device driver) would use struct blk_flush_queue, and even if one did, it would most likely be via a pointer. This commit moves orig_rq to the end of the structure, so that the offsets of the existing elements remain the same as before. It also wraps orig_rq in "#ifndef __GENKSYMS__" to hide it from the kABI checker. Signed-off-by: Dan Duval --- diff --git a/block/blk.h b/block/blk.h index e01b5ee80fe7..412dfd780426 100644 --- a/block/blk.h +++ b/block/blk.h @@ -27,8 +27,10 @@ struct blk_flush_queue { * flush_rq shares tag with this rq, both can't be active * at the same time */ - struct request *orig_rq; spinlock_t mq_flush_lock; +#ifndef __GENKSYMS__ + struct request *orig_rq; +#endif }; extern struct kmem_cache *blk_requestq_cachep;