summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2024-06-25 21:42:44 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-12 11:11:42 +0200
commit5ff0a441419576b8694a2b19c4a689f5c04095e5 (patch)
tree8bc7493ba8dc230fad0f3096ad48e5d857e2c3bb /kernel/workqueue.c
parent0eceaa9d0560304c773d409eb2e61c00b8b021cf (diff)
downloadlinux-5ff0a441419576b8694a2b19c4a689f5c04095e5.tar.gz
linux-5ff0a441419576b8694a2b19c4a689f5c04095e5.tar.bz2
linux-5ff0a441419576b8694a2b19c4a689f5c04095e5.zip
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 <npiggin@gmail.com> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 8c7bafbee1b1..a1665c2e04b4 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;
}