Commit 4b57dccc authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 140e40e3 75d8cce1
...@@ -188,14 +188,18 @@ EXPORT_SYMBOL(irq_poll_init); ...@@ -188,14 +188,18 @@ EXPORT_SYMBOL(irq_poll_init);
static int irq_poll_cpu_dead(unsigned int cpu) static int irq_poll_cpu_dead(unsigned int cpu)
{ {
/* /*
* If a CPU goes away, splice its entries to the current CPU * If a CPU goes away, splice its entries to the current CPU and
* and trigger a run of the softirq * 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(); local_irq_disable();
list_splice_init(&per_cpu(blk_cpu_iopoll, cpu), list_splice_init(&per_cpu(blk_cpu_iopoll, cpu),
this_cpu_ptr(&blk_cpu_iopoll)); this_cpu_ptr(&blk_cpu_iopoll));
__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
local_irq_enable(); local_irq_enable();
local_bh_enable();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment