lkml.org 
[lkml]   [2024]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v13 02/13] irqchip/sifive-plic: Improve locking safety by using irqsave/irqrestore
On Tue, Feb 20, 2024 at 3:41 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Tue, Feb 20 2024 at 11:37, Anup Patel wrote:
> > Now that PLIC driver is probed as a regular platform driver, the lock
> > dependency validator complains about the safety of handler->enable_lock
> > usage:
> >
> > [ 0.956775] Possible interrupt unsafe locking scenario:
> >
> > [ 0.956998] CPU0 CPU1
> > [ 0.957247] ---- ----
> > [ 0.957439] lock(&handler->enable_lock);
> > [ 0.957607] local_irq_disable();
> > [ 0.957793] lock(&irq_desc_lock_class);
> > [ 0.958021] lock(&handler->enable_lock);
> > [ 0.958246] <Interrupt>
> > [ 0.958342] lock(&irq_desc_lock_class);
> > [ 0.958501]
> > *** DEADLOCK ***
> >
> > To address above, let's use raw_spin_lock_irqsave/unlock_irqrestore()
> > instead of raw_spin_lock/unlock().
>
> s/let's//

Okay, I will update.

Regards,
Anup

\
 
 \ /
  Last update: 2024-05-27 15:14    [W:0.072 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site