From: Ionut Nechita ionut.nechita@windriver.com
Fix warning "WARN_ON_ONCE(!async && in_interrupt())" that occurs during SCSI device scanning when blk_freeze_queue_start() calls blk_mq_run_hw_queues() synchronously from interrupt context.
The issue happens during device removal/scanning when: 1. blk_mq_destroy_queue() -> blk_queue_start_drain() 2. blk_freeze_queue_start() calls blk_mq_run_hw_queues(q, false) 3. This triggers the warning in blk_mq_run_hw_queue() when in interrupt context
Change the synchronous call to asynchronous to avoid running in interrupt context.
Fixes: Warning in blk_mq_run_hw_queue+0x1fa/0x260 Signed-off-by: Ionut Nechita ionut.nechita@windriver.com --- block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c index 5fb8da4958d0..ae152f7a6933 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -128,7 +128,7 @@ void blk_freeze_queue_start(struct request_queue *q) percpu_ref_kill(&q->q_usage_counter); mutex_unlock(&q->mq_freeze_lock); if (queue_is_mq(q)) - blk_mq_run_hw_queues(q, false); + blk_mq_run_hw_queues(q, true); } else { mutex_unlock(&q->mq_freeze_lock); }