diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-23 16:37:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-23 16:37:35 -0700 |
commit | 4b57dccc42a790cdf2a8cad110143feb8b35e563 (patch) | |
tree | 3a112be712b558a480aead8398f2e80e99344615 /lib | |
parent | 140e40e39a29c7dbc188d9b43831c3d5e089c960 (diff) | |
parent | 75d8cce128c516fe6cf4b8683e8fe1a59e919902 (diff) |
Merge tag 'core-core-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irqpoll update from Thomas Gleixner:
"A single update for irqpoll:
Ensure that a raised soft interrupt is handled after pulling the
blk_cpu_iopoll backlog from a unplugged CPU. This prevents that the
CPU which runs that code reaches idle with soft interrupts pending"
* tag 'core-core-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
lib/irq_poll: Prevent softirq pending leak in irq_poll_cpu_dead()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irq_poll.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/irq_poll.c b/lib/irq_poll.c index 2f17b488d58e..2d5329a42105 100644 --- a/lib/irq_poll.c +++ b/lib/irq_poll.c @@ -188,14 +188,18 @@ EXPORT_SYMBOL(irq_poll_init); static int irq_poll_cpu_dead(unsigned int cpu) { /* - * If a CPU goes away, splice its entries to the current CPU - * and trigger a run of the softirq + * If a CPU goes away, splice its entries to the current CPU and + * set the POLL softirq bit. The local_bh_disable()/enable() pair + * ensures that it is handled. Otherwise the current CPU could + * reach idle with the POLL softirq pending. */ + local_bh_disable(); local_irq_disable(); list_splice_init(&per_cpu(blk_cpu_iopoll, cpu), this_cpu_ptr(&blk_cpu_iopoll)); __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); local_irq_enable(); + local_bh_enable(); return 0; } |