linux/arch
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
..
alpha alpha: enable GENERIC_PCI_IOMAP unconditionally 2021-09-19 10:37:00 -07:00
arc signal: Replace force_sigsegv(SIGSEGV) with force_fatal_sig(SIGSEGV) 2021-11-25 09:49:06 +01:00
arm ARM: dts: qcom: sdx55: fix IPA interconnect definitions 2022-01-27 11:04:39 +01:00
arm64 arm64: tegra: Adjust length of CCPLEX cluster MMIO region 2022-01-27 11:04:43 +01:00
csky perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon hexagon: clean up timer-regs.h 2021-11-25 09:48:42 +01:00
ia64 ia64: don't do IA64_CMPXCHG_DEBUG without CONFIG_PRINTK 2021-11-18 19:16:13 +01:00
m68k signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-25 09:49:07 +01:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips MIPS: compressed: Fix build with ZSTD compression 2022-01-27 11:04:21 +01:00
nds32 perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-10-27 09:29:07 -05:00
openrisc openrisc: Add clone3 ABI wrapper 2022-01-27 11:04:10 +01:00
parisc parisc: Avoid calling faulthandler_disabled() twice 2022-01-27 11:04:55 +01:00
powerpc powerpc/watchdog: Fix missed watchdog reset due to memory ordering race 2022-01-27 11:04:57 +01:00
riscv riscv: mm: fix wrong phys_ram_base value for RV64 2022-01-27 11:02:50 +01:00
s390 KVM: s390: Clarify SIGP orders versus STOP/RESTART 2022-01-20 09:13:14 +01:00
sh sh: define __BIG_ENDIAN for math-emu 2021-11-25 09:48:31 +01:00
sparc signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-25 09:49:07 +01:00
um um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 11:04:48 +01:00
x86 x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-27 11:04:56 +01:00
xtensa xtensa: xtfpga: Try software restart before simulating CPU reset 2021-10-05 12:19:05 -07:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 19:17:21 +01:00