Message ID | 5540e56d9b9a2998b73b11363670a8d9be46c4a4.1522775475.git.joseph.salisbury@canonical.com |
---|---|
State | New |
Headers | show |
Series | powerpc/64s: Fix lost pending interrupt due to race causing lost update to irq_happened | expand |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index b7a8452..c933632 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -475,6 +475,14 @@ void force_external_irq_replay(void) */ WARN_ON(!arch_irqs_disabled()); + /* + * Interrupts must always be hard disabled before irq_happened is + * modified (to prevent lost update in case of interrupt between + * load and store). + */ + __hard_irq_disable(); + local_paca->irq_happened |= PACA_IRQ_HARD_DIS; + /* Indicate in the PACA that we have an interrupt to replay */ local_paca->irq_happened |= PACA_IRQ_EE; }