linux/arch/powerpc
Nicholas Piggin 52ce10c187 powerpc/watchdog: Fix missed watchdog reset due to memory ordering race
[ Upstream commit 5dad4ba68a ]

It is possible for all CPUs to miss the pending cpumask becoming clear,
and then nobody resetting it, which will cause the lockup detector to
stop working. It will eventually expire, but watchdog_smp_panic will
avoid doing anything if the pending mask is clear and it will never be
reset.

Order the cpumask clear vs the subsequent test to close this race.

Add an extra check for an empty pending mask when the watchdog fires and
finds its bit still clear, to try to catch any other possible races or
bugs here and keep the watchdog working. The extra test in
arch_touch_nmi_watchdog is required to prevent the new warning from
firing off.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Debugged-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211110025056.2084347-2-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:04:57 +01:00
..
boot powerpc/5200: dts: fix memory node unit name 2021-11-25 09:48:30 +01:00
configs powerpc/configs/microwatt: Enable options for systemd 2021-08-27 00:56:53 +10:00
crypto crypto: powepc/sha1 - remove unneeded semicolon 2021-03-07 15:13:14 +11:00
include powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC 2022-01-27 11:04:07 +01:00
kernel powerpc/watchdog: Fix missed watchdog reset due to memory ordering race 2022-01-27 11:04:57 +01:00
kexec powerpc updates for 5.15 2021-09-03 11:22:50 -07:00
kvm KVM: PPC: Book3S HV: Prevent POWER7/8 TLB flush flushing SLB 2021-12-01 09:04:43 +01:00
lib powerpc/security: Use a mutex for interrupt exit code patching 2021-11-18 19:17:19 +01:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/32s: Fix shift-out-of-bounds in KASAN init 2022-01-27 11:04:08 +01:00
net powerpc/bpf: Fix write protecting JIT code 2021-11-18 19:17:19 +01:00
perf powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC 2022-01-27 11:04:07 +01:00
platforms powerpc/cell: add missing of_node_put 2022-01-27 11:04:57 +01:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/xive: Add missing null check after calling kmalloc 2022-01-27 11:04:18 +01:00
tools powerpc/head_check: Fix shellcheck errors 2021-08-17 22:52:02 +10:00
xmon powerpc/xmon: fix task state output 2021-11-18 19:16:57 +01:00
Kbuild
Kconfig powerpc/booke: Disable STRICT_KERNEL_RWX, DEBUG_PAGEALLOC and KFENCE 2021-11-18 19:16:54 +01:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile powerpc: Add "-z notext" flag to disable diagnostic 2021-08-15 13:49:39 +10:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00