android_kernel_motorola_sm6225/arch
Nicholas Piggin ffa74f3805 powerpc/watchdog: Fix missed watchdog reset due to memory ordering race
[ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ]

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 09:04:29 +01:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-10-06 15:31:18 +02:00
arc arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2021-11-06 13:58:45 +01:00
arm ARM: dts: armada-38x: Add generic compatible to UART nodes 2022-01-27 09:04:20 +01:00
arm64 arm64: tegra: Adjust length of CCPLEX cluster MMIO region 2022-01-27 09:04:26 +01:00
c6x
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 15:00:58 +01:00
hexagon hexagon: export raw I/O routines for modules 2021-11-26 11:36:23 +01:00
ia64 hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-01 09:27:43 +01:00
m68k m68k: set a default value for MEMORY_RESERVE 2021-11-26 11:36:15 +01:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips mips: bcm63xx: add support for clk_set_parent() 2022-01-27 09:04:23 +01:00
nds32 nds32: fix up stack guard gap 2021-07-28 11:13:51 +02:00
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-11-02 18:26:45 +01:00
openrisc openrisc: don't printk() unconditionally 2021-09-22 11:48:01 +02:00
parisc parisc: Avoid calling faulthandler_disabled() twice 2022-01-27 09:04:28 +01:00
powerpc powerpc/watchdog: Fix missed watchdog reset due to memory ordering race 2022-01-27 09:04:29 +01:00
riscv arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2021-11-06 13:58:45 +01:00
s390 KVM: s390: Clarify SIGP orders versus STOP/RESTART 2022-01-27 09:04:13 +01:00
sh hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-01 09:27:43 +01:00
sparc sparc64: fix pci_iounmap() when CONFIG_PCI is not set 2021-10-09 14:11:03 +02:00
um um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 09:04:26 +01:00
unicore32
x86 um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 09:04:26 +01:00
xtensa xtensa: use CONFIG_USE_OF instead of CONFIG_OF 2021-12-01 09:27:39 +01:00
.gitignore
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol 2021-12-22 09:19:01 +01:00