Skip to contentSkip to conversation

blk-mq: Avoid that request queue removal can trigger list corruption

PATCH In review Bart Van Assche 2 participants 2 messages Nov 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blk-mq: Avoid that request queue removal can trigger list corruption

Avoid that removal of a request queue sporadically triggers the following warning:

list_del corruption. next->prev should be ffff8807d649b970, but was 6b6b6b6b6b6b6b6b

WARNING: CPU: 3 PID: 342 at lib/list_debug.c:56 __list_del_entry_valid+0x92/0xa0
Call Trace:
 process_one_work+0x11b/0x660
 worker_thread+0x3d/0x3b0
 kthread+0x129/0x140
 ret_from_fork+0x27/0x40
Cc Christoph Hellwig <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Johannes Thumshirn <[email protected]>
---
 block/blk-core.c | 1 +
 1 file changed, 1 insertion(+)
block/blk-core.c +1 -0
index 25ccddd0b82a..1b80d43fcbc6 100644
@@ -339,6 +339,7 @@ void blk_sync_queue(struct request_queue *q)
 		struct blk_mq_hw_ctx *hctx;
 		int i;
 
+		cancel_delayed_work_sync(&q->requeue_work);
 		queue_for_each_hw_ctx(q, hctx, i)
 			cancel_delayed_work_sync(&hctx->run_work);
 	} else {
Signature · 1 line
2.14.3
maintainer
#1 lore raw
Quoted 10 lines · Bart Van Assche

Avoid that removal of a request queue sporadically triggers the following warning:

list_del corruption. next->prev should be ffff8807d649b970, but was 6b6b6b6b6b6b6b6b

WARNING: CPU: 3 PID: 342 at lib/list_debug.c:56 __list_del_entry_valid+0x92/0xa0
Call Trace:
 process_one_work+0x11b/0x660
 worker_thread+0x3d/0x3b0
 kthread+0x129/0x140
 ret_from_fork+0x27/0x40

Looks good to me, applied.

Signature · 1 line
Jens Axboe