diff options
| author | Anup Patel <[email protected]> | 2024-02-22 15:09:55 +0530 | 
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2024-02-23 10:18:44 +0100 | 
| commit | abb7205794900503d6358ef1fb645373753a794d (patch) | |
| tree | ef5ae1cf2202d6756ef15d15543a85c84823ee36 /scripts/gcc-plugins/gcc-common.h | |
| parent | 95652106478030f54620b1f0d28f78ab110b3212 (diff) | |
irqchip/sifive-plic: Improve locking safety by using irqsave/irqrestore
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, use raw_spin_lock_irqsave/unlock_irqrestore() instead
of raw_spin_lock/unlock().
Signed-off-by: Anup Patel <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/gcc-common.h')
0 files changed, 0 insertions, 0 deletions