[dm-devel] [PATCH v3 2/8] block: initialize bio member of blk-mq request to NULL

Mike Snitzer snitzer at redhat.com
Wed Dec 17 03:59:58 UTC 2014


Otherwise blk_rq_prep_clone() will crash when cloning a blk-mq request,
with: BUG: unable to handle kernel paging request at 00001dfa0d00005e

Signed-off-by: Mike Snitzer <snitzer at redhat.com>
---
 block/blk-mq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 6cd94ba..ff09337 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -183,6 +183,7 @@ static void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx,
 #if defined(CONFIG_BLK_DEV_INTEGRITY)
 	rq->nr_integrity_segments = 0;
 #endif
+	rq->bio = NULL;
 	rq->special = NULL;
 	/* tag was already set */
 	rq->errors = 0;
-- 
1.9.3




More information about the dm-devel mailing list