Skip to content

Commit 0493523

Browse files
Ionut Nechitakawasaki
authored andcommitted
block: Fix WARN_ON in blk_mq_run_hw_queue when called from interrupt context
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 <[email protected]>
1 parent 925e382 commit 0493523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ bool __blk_freeze_queue_start(struct request_queue *q,
171171
percpu_ref_kill(&q->q_usage_counter);
172172
mutex_unlock(&q->mq_freeze_lock);
173173
if (queue_is_mq(q))
174-
blk_mq_run_hw_queues(q, false);
174+
blk_mq_run_hw_queues(q, true);
175175
} else {
176176
mutex_unlock(&q->mq_freeze_lock);
177177
}

0 commit comments

Comments
 (0)