[PATCH 1/4] workqueue: wq_watchdog_touch is always called with valid CPU
From: Nicholas Piggin
Date: Tue Jun 25 2024 - 07:43:21 EST
Warn in the case it is called with cpu == -1. This does not appear
to happen anywhere.
Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx>
---
kernel/workqueue.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 003474c9a77d..0954b778b315 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -7562,6 +7562,8 @@ notrace void wq_watchdog_touch(int cpu)
{
if (cpu >= 0)
per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies;
+ else
+ WARN_ONCE(1, "%s should be called with valid CPU", __func__);
wq_watchdog_touched = jiffies;
}
--
2.45.1