]> git.baikalelectronics.ru Git - kernel.git/commit
lib/irq_poll: Prevent softirq pending leak in irq_poll_cpu_dead()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 10 Apr 2022 12:49:36 +0000 (14:49 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 13 Apr 2022 19:32:21 +0000 (21:32 +0200)
commit7a49dbc884c70ab5775460c367d7b314549a04cc
treec90aa58d0e8ae63b4915d5af63c63ebc499fb561
parentef8e7cd3bfb3e514a5772f2c5874cf0913238d68
lib/irq_poll: Prevent softirq pending leak in irq_poll_cpu_dead()

irq_poll_cpu_dead() pulls the blk_cpu_iopoll backlog from the dead CPU and
raises the POLL softirq with __raise_softirq_irqoff() on the CPU it is
running on. That just sets the bit in the pending softirq mask.

This means the handling of the softirq is delayed until the next interrupt
or a local_bh_disable/enable() pair. As a consequence the CPU on which this
code runs can reach idle with the POLL softirq pending, which triggers a
warning in the NOHZ idle code.

Add a local_bh_disable/enable() pair around the interrupts disabled section
in irq_poll_cpu_dead(). local_bh_enable will handle the pending softirq.

[tglx: Massaged changelog and comment]

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/87k0bxgl27.ffs@tglx
lib/irq_poll.c