mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 06:07:32 +02:00
workqueue: Use raise_softirq() to trigger softirq in irq_work handler
bh_pool_kick_normal() and bh_pool_kick_highpri() are registered via
init_irq_work() without the IRQ_WORK_HARD_IRQ flag. On PREEMPT_RT, such
irq_work items are processed by the per-CPU irq_workd kthread in preemptible
task context with IRQs enabled. However, raise_softirq_irqoff() requires
IRQs to be disabled. Calling it from irq_workd trips the lockdep assertion
in __raise_softirq_irqoff() and the non-atomic update of the softirq pending
mask can lose bits raised by an interrupt on the same CPU. Replace
raise_softirq_irqoff() with raise_softirq() in the irq_work handlers.
Fixes: 2f34d7337d ("workqueue: Fix queue_work_on() with BH workqueues")
Cc: stable@vger.kernel.org # v6.9+
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
6eca8f94d8
commit
7e2f2a377a
|
|
@ -8065,12 +8065,12 @@ static inline void wq_watchdog_init(void) { }
|
|||
|
||||
static void bh_pool_kick_normal(struct irq_work *irq_work)
|
||||
{
|
||||
raise_softirq_irqoff(TASKLET_SOFTIRQ);
|
||||
raise_softirq(TASKLET_SOFTIRQ);
|
||||
}
|
||||
|
||||
static void bh_pool_kick_highpri(struct irq_work *irq_work)
|
||||
{
|
||||
raise_softirq_irqoff(HI_SOFTIRQ);
|
||||
raise_softirq(HI_SOFTIRQ);
|
||||
}
|
||||
|
||||
static void __init restrict_unbound_cpumask(const char *name, const struct cpumask *mask)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user