[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pmzxyd64.fsf@nanos.tec.linutronix.de>
Date: Wed, 17 Mar 2021 17:09:55 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Johan Hovold <johan@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-serial@...r.kernel.org
Subject: Re: [patch 1/1] genirq: Disable interrupts for force threaded handlers
On Wed, Mar 17 2021 at 15:48, Sebastian Andrzej Siewior wrote:
> On 2021-03-17 15:38:52 [+0100], Thomas Gleixner wrote:
>> thread(irq_A)
>> irq_handler(A)
>> spin_lock(&foo->lock);
>>
>> interrupt(irq_B)
>> irq_handler(B)
>> spin_lock(&foo->lock);
>
> It will not because both threads will wake_up(thread). It is an issue if
> - if &foo->lock is shared between a hrtimer and threaded-IRQ
> - if &foo->lock is shared between a non-threaded and thread-IRQ
> - if &foo->lock is shared between a printk() in hardirq context and
> thread-IRQ as I learned today.
That's the point and it's entirely clear from the above: A is thread
context and B is hard interrupt context and if the lock is shared then
it's busted. Otherwise we would not have this discussion at all.
Powered by blists - more mailing lists