aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/mm.py
diff options
context:
space:
mode:
authorChengfeng Ye <[email protected]>2023-07-26 12:56:55 +0000
committerMartin K. Petersen <[email protected]>2023-08-07 21:34:08 -0400
commitdd64f80587190265ca8a0f4be6c64c2fda6d3ac2 (patch)
treec76b971dda3ac702bf314be9e318abe7142ec8a2 /scripts/gdb/linux/mm.py
parent8eebf0e84f0614cebc7347f7bbccba4056d77d42 (diff)
scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
As &qedi_percpu->p_work_lock is acquired by hard IRQ qedi_msix_handler(), other acquisitions of the same lock under process context should disable IRQ, otherwise deadlock could happen if the IRQ preempts the execution while the lock is held in process context on the same CPU. qedi_cpu_offline() is one such function which acquires the lock in process context. [Deadlock Scenario] qedi_cpu_offline() ->spin_lock(&p->p_work_lock) <irq> ->qedi_msix_handler() ->edi_process_completions() ->spin_lock_irqsave(&p->p_work_lock, flags); (deadlock here) This flaw was found by an experimental static analysis tool I am developing for IRQ-related deadlocks. The tentative patch fix the potential deadlock by spin_lock_irqsave() under process context. Signed-off-by: Chengfeng Ye <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Manish Rangankar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/mm.py')
0 files changed, 0 insertions, 0 deletions