Skip to content

Commit 18e24de

Browse files
npigginhtejun
authored andcommitted
workqueue: wq_watchdog_touch is always called with valid CPU
Warn in the case it is called with cpu == -1. This does not appear to happen anywhere. Signed-off-by: Nicholas Piggin <[email protected]> Reviewed-by: Paul E. McKenney <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent a071b04 commit 18e24de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/workqueue.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7526,6 +7526,8 @@ notrace void wq_watchdog_touch(int cpu)
75267526
{
75277527
if (cpu >= 0)
75287528
per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies;
7529+
else
7530+
WARN_ONCE(1, "%s should be called with valid CPU", __func__);
75297531

75307532
wq_watchdog_touched = jiffies;
75317533
}

0 commit comments

Comments
 (0)