]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fix kABI breakage from "blk-mq: fix race between timeout and freeing request"
authorDan Duval <dan.duval@oracle.com>
Wed, 8 Jun 2016 20:55:48 +0000 (16:55 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Jul 2016 07:09:50 +0000 (00:09 -0700)
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 <dan.duval@oracle.com>
block/blk.h

index e01b5ee80fe757cd6b17014dbf68613f6024f59f..412dfd7804269a454b942eab640322f1af2dc678 100644 (file)
@@ -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;