summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-02-06 03:18:02 -0800
committerTejun Heo <tj@kernel.org>2026-02-07 06:54:42 -1000
commit9cb8b0f289560728dbb8b88158e7a957e2e90a14 (patch)
tree0d85afce6d08dee0fdc1abe7c8bd23d66d85971c /kernel
parentf84c9dd34e8dce3fb42598344da711573b383626 (diff)
workqueue: replace BUG_ON with panic in panic_on_wq_watchdog
Replace BUG_ON() with panic() in panic_on_wq_watchdog(). This is not a bug condition but a deliberate forced panic requested by the user via module parameters to crash the system for debugging purposes. Using panic() instead of BUG_ON() makes this intent clearer and provides more informative output about which threshold was exceeded and the actual values, making it easier to diagnose the stall condition from crash dumps. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/workqueue.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 68e664d7dbec..e6c249f2fb46 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -7637,10 +7637,14 @@ static void panic_on_wq_watchdog(unsigned int stall_time_sec)
if (wq_panic_on_stall) {
wq_stall++;
- BUG_ON(wq_stall >= wq_panic_on_stall);
+ if (wq_stall >= wq_panic_on_stall)
+ panic("workqueue: %u stall(s) exceeded threshold %u\n",
+ wq_stall, wq_panic_on_stall);
}
- BUG_ON(wq_panic_on_stall_time && stall_time_sec >= wq_panic_on_stall_time);
+ if (wq_panic_on_stall_time && stall_time_sec >= wq_panic_on_stall_time)
+ panic("workqueue: stall lasted %us, exceeding threshold %us\n",
+ stall_time_sec, wq_panic_on_stall_time);
}
static void wq_watchdog_reset_touched(void)