]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
watchdog/softlockup: Fix cpu_stop_queue_work() double-queue bug
authorPeter Zijlstra <peterz@infradead.org>
Fri, 13 Jul 2018 10:42:08 +0000 (12:42 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 15 Jul 2018 21:51:19 +0000 (23:51 +0200)
commitbe45bf5395e0886a93fc816bbe41a008ec2e42e2
treead459f7d60364e75743ef18066dffc6a31088f08
parentfdf2ceb7f58c28639a36f8895006828582a1f5b2
watchdog/softlockup: Fix cpu_stop_queue_work() double-queue bug

When scheduling is delayed for longer than the softlockup interrupt
period it is possible to double-queue the cpu_stop_work, causing list
corruption.

Cure this by adding a completion to track the cpu_stop_work's
progress.

Reported-by: kernel test robot <lkp@intel.com>
Tested-by: Rong Chen <rong.a.chen@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work")
Link: http://lkml.kernel.org/r/20180713104208.GW2494@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/watchdog.c