lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200402195028.skpufyn4c6ktgai3@linutronix.de>
Date:   Thu, 2 Apr 2020 21:50:28 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] irq_poll: Use raise_softirq_irqoff() in cpu_dead notifier

__raise_softirq_irqoff() adds a pending sofirq mask and this is it. The
softirq won't be invoked unless something checks for a pending softirq
which should happen once the next interrupt fires. The CPU might go
idle in the meantime.

Use raise_softirq_irqoff() to wake ksoftirqd() if the list has work
items pending.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---

Maybe preempt_check_resched() should be added to act on a possible
need_resched flag. Otherwise it will be delayed to the next
cond_resched() / spin_unlock().

 lib/irq_poll.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/irq_poll.c b/lib/irq_poll.c
index 2f17b488d58e1..484dbd2aa09fb 100644
--- a/lib/irq_poll.c
+++ b/lib/irq_poll.c
@@ -194,7 +194,8 @@ static int irq_poll_cpu_dead(unsigned int cpu)
 	local_irq_disable();
 	list_splice_init(&per_cpu(blk_cpu_iopoll, cpu),
 			 this_cpu_ptr(&blk_cpu_iopoll));
-	__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
+	if (!list_empty(this_cpu_ptr(&blk_cpu_iopoll)))
+		raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
 	local_irq_enable();
 
 	return 0;
-- 
2.26.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ