From: Nicholas Piggin Date: Tue, 25 Jun 2024 11:42:44 +0000 (+1000) Subject: workqueue: wq_watchdog_touch is always called with valid CPU X-Git-Tag: v6.6.51~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ff0a441419576b8694a2b19c4a689f5c04095e5;p=thirdparty%2Fkernel%2Fstable.git workqueue: wq_watchdog_touch is always called with valid CPU [ Upstream commit 18e24deb1cc92f2068ce7434a94233741fbd7771 ] Warn in the case it is called with cpu == -1. This does not appear to happen anywhere. Signed-off-by: Nicholas Piggin Reviewed-by: Paul E. McKenney Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 8c7bafbee1b13..a1665c2e04b46 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6458,6 +6458,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; }