[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251222201541.11961-3-ionut.nechita@windriver.com>
Date: Mon, 22 Dec 2025 22:15:41 +0200
From: "Ionut Nechita (WindRiver)" <djiony2011@...il.com>
To: ming.lei@...hat.com
Cc: axboe@...nel.dk,
gregkh@...uxfoundation.org,
ionut.nechita@...driver.com,
linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org,
muchun.song@...ux.dev,
sashal@...nel.org,
stable@...r.kernel.org
Subject: [PATCH v2 2/2] block: Fix WARN_ON in blk_mq_run_hw_queue when called from interrupt context
From: Ionut Nechita <ionut.nechita@...driver.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@...driver.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);
}
--
2.52.0
Powered by blists - more mailing lists