]> git.hungrycats.org Git - linux/commit
powerpc/64s/interrupt: Fix lost interrupts when returning to soft-masked context
authorNicholas Piggin <npiggin@gmail.com>
Thu, 13 Oct 2022 06:44:18 +0000 (16:44 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:58:30 +0000 (09:58 +0200)
commit43f49952df6ac7601cb99ba88ba472df8e7b1431
treee48ea215c53645b5b074f9a0d8fcd3355ba2f609
parentdf0da3fc131132b6c32a15c4da4ffa3a5aea1af2
powerpc/64s/interrupt: Fix lost interrupts when returning to soft-masked context

commit a4cb3651a174366cc85a677da9e3681fbe97fdae upstream.

It's possible for an interrupt returning to an irqs-disabled context to
lose a pending soft-masked irq because it branches to part of the exit
code for irqs-enabled contexts, which is meant to clear only the
PACA_IRQS_HARD_DIS flag from PACAIRQHAPPENED by zeroing the byte. This
just looks like a simple thinko from a recent commit (if there was no
hard mask pending, there would be no reason to clear it anyway).

This also adds comment to the code that actually does need to clear the
flag.

Fixes: e485f6c751e0a ("powerpc/64/interrupt: Fix return to masked context after hard-mask irq becomes pending")
Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221013064418.1311104-1-npiggin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/interrupt_64.S