From: Mike Christie <michael.christie@oracle.com>
To: Jia-Ju Bai <baijiaju1990@gmail.com>,
njavali@marvell.com, mrangankar@marvell.com,
GR-QLogic-Storage-Upstream@marvell.com, jejb@linux.ibm.com,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] scsi: qedi: possible ABBA deadlock in qedi_process_tmf_resp() and qedi_process_cmd_cleanup_resp()
Date: Tue, 8 Feb 2022 11:10:56 -0600 [thread overview]
Message-ID: <ce037c65-6eb3-6bce-0e79-4e483e090396@oracle.com> (raw)
In-Reply-To: <e468fdcb-f47f-e01a-da65-68da79020165@gmail.com>
On 2/8/22 5:23 AM, Jia-Ju Bai wrote:
> Hello,
>
> My static analysis tool reports a possible ABBA deadlock in the qedi driver in Linux 5.16:
>
> qedi_process_tmf_resp()
> spin_lock(&session->back_lock); --> Line 201 (Lock A)
> spin_lock(&qedi_conn->tmf_work_lock); --> Line 230 (Lock B)
>
> qedi_process_cmd_cleanup_resp()
> spin_lock_bh(&qedi_conn->tmf_work_lock); --> Line 752 (Lock B)
> spin_lock_bh(&conn->session->back_lock); --> Line 784 (Lock A)
>
> When qedi_process_tmf_resp() and qedi_process_cmd_cleanup_resp() 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 :)
>
That looks like a valid deadlock. I'll send a patch. Thanks.
> Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
>
>
> Best wishes,
> Jia-Ju Bai
prev parent reply other threads:[~2022-02-08 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 11:23 Jia-Ju Bai
2022-02-08 17:10 ` Mike Christie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce037c65-6eb3-6bce-0e79-4e483e090396@oracle.com \
--to=michael.christie@oracle.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=baijiaju1990@gmail.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mrangankar@marvell.com \
--cc=njavali@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®