Skip to content

Commit cdabce2

Browse files
JiafeiPanKAGA-KOKO
authored andcommitted
softirq: Add debug check to __raise_softirq_irqoff()
__raise_softirq_irqoff() must be called with interrupts disabled to protect the per CPU softirq pending state update against an interrupt and soft interrupt handling on return from interrupt. Add a lockdep assertion to validate the calling convention. [ tglx: Massaged changelog ] Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20200814045522.45719-1-Jiafei.Pan@nxp.com
1 parent 856deb8 commit cdabce2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/softirq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ void raise_softirq(unsigned int nr)
481481

482482
void __raise_softirq_irqoff(unsigned int nr)
483483
{
484+
lockdep_assert_irqs_disabled();
484485
trace_softirq_raise(nr);
485486
or_softirq_pending(1UL << nr);
486487
}

0 commit comments

Comments
 (0)