Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs
From: Steven Rostedt
Date: Thu Jun 27 2019 - 10:35:00 EST
On Thu, 27 Jun 2019 10:24:36 -0400
Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote:
> > What am I missing here?
>
> This issue I think is
>
> (in normal process context)
> spin_lock_irqsave(rq_lock); // which disables both preemption and interrupt
> // but this was done in normal process context,
> // not from IRQ handler
> rcu_read_lock();
> <---------- IPI comes in and sets exp_hint
How would an IPI come in here with interrupts disabled?
-- Steve
> rcu_read_unlock()
> -> rcu_read_unlock_special
> -> raise_softirq_irqoff
> -> wakeup_softirq <--- because in_interrupt returns false.
>
> I think the issue is in_interrupt() does not know about threaded interrupts.
> If it did, then the ksoftirqd wake up would not happen.
>
> Did I get something wrong?