]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/traps: do not enable irqs in _exception
authorNicholas Piggin <npiggin@gmail.com>
Mon, 4 Oct 2021 14:56:39 +0000 (00:56 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 07:42:03 +0000 (09:42 +0200)
commit22ee1f15a72e50fae65ea3df9461e8c2d4e3cc1b
tree5e6763790e1aeec191f9e563f987621196444a90
parentc835b3d1d6362b4a4ebb192da7e7fd27a0a45d01
powerpc/traps: do not enable irqs in _exception

[ Upstream commit d0afd44c05f8f4e4c91487c02d43c87a31552462 ]

_exception can be called by machine check handlers when the MCE hits
user code (e.g., pseries and powernv). This will enable local irqs
because, which is a dicey thing to do in NMI or hard irq context.

This seemed to worked out okay because a userspace MCE can basically be
treated like a synchronous interrupt (after async / imprecise MCEs are
filtered out). Since NMI and hard irq handlers have started growing
nmi_enter / irq_enter, and more irq state sanity checks, this has
started to cause problems (or at least trigger warnings).

The Fixes tag to the commit which introduced this rather than try to
work out exactly which commit was the first that could possibly cause a
problem because that may be difficult to prove.

Fixes: 9f2f79e3a3c1 ("powerpc: Disable interrupts in 64-bit kernel FP and vector faults")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211004145642.1331214-3-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/traps.c