* [BUG] scsi: lpfc: possible ABBCCA deadlock involving three threads
@ 2021-08-23 11:31 Jia-Ju Bai
0 siblings, 0 replies; only message in thread
From: Jia-Ju Bai @ 2021-08-23 11:31 UTC (permalink / raw)
To: james.smart, dick.kennedy, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel
Hello,
My static analysis tool reports a possible ABBCCA deadlock in the lpfc
driver in Linux 5.10:
lpfc_els_flush_cmd()
spin_lock(&pring->ring_lock); --> line 8124 (Lock A)
lpfc_sli_cancel_iocbs()
lpfc_sli_release_iocbq()
spin_lock_irqsave(&phba->hbalock, iflags); --> line 1384 (Lock B)
lpfc_sli_abort_taskmgmt()
spin_lock_irqsave(&phba->hbalock, iflags); --> line 11812 (Lock B)
spin_lock(&lpfc_cmd->buf_lock); --> line 11830 (Lock C)
lpfc_abort_handler()
spin_lock(&lpfc_cmd->buf_lock); --> line 4760 (Lock C)
spin_lock(&pring_s4->ring_lock); --> line 4777 (Lock A)
When lpfc_els_flush_cmd(), lpfc_sli_abort_taskmgmt() and
lpfc_abort_handler() are concurrently executed, the deadlock can occur.
I am not quite sure whether this possible deadlock is real and how to
fix it if it is real.
Any feedback would be appreciated, thanks :)
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Best wishes,
Jia-Ju Bai
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-23 11:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 11:31 [BUG] scsi: lpfc: possible ABBCCA deadlock involving three threads Jia-Ju Bai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).