lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 1/1] genirq: Disable interrupts for force threaded handlers
Date
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.

\
 
 \ /
  Last update: 2021-03-17 17:10    [W:2.016 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site