All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: james.smart@broadcom.com, dick.kennedy@broadcom.com,
	jejb@linux.ibm.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [BUG] scsi: lpfc: possible ABBA deadlock
Date: Thu, 15 Jul 2021 18:37:55 +0800	[thread overview]
Message-ID: <652256c8-6fce-a506-76a9-e1502a5ff82e@gmail.com> (raw)

Hello,

I find there is a possible ABBA deadlock in the lpfc driver in Linux 5.10:

In lpfc_nvmet_unsol_fcp_issue_abort():
3502:     spin_lock_irqsave(&ctxp->ctxlock, flags);
3504: spin_lock(&phba->sli4_hba.abts_nvmet_buf_list_lock);

In lpfc_sli4_nvmet_xri_aborted():
1787: spin_lock(&phba->sli4_hba.abts_nvmet_buf_list_lock);
1794:     spin_lock(&ctxp->ctxlock);

When lpfc_nvmet_unsol_fcp_issue_abort() and 
lpfc_sli4_nvmet_xri_aborted() 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 :)


Best wishes,
Jia-Ju Bai

             reply	other threads:[~2021-07-15 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 10:37 Jia-Ju Bai [this message]
2021-07-24 20:18 ` [BUG] scsi: lpfc: possible ABBA deadlock James Smart

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=652256c8-6fce-a506-76a9-e1502a5ff82e@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.