From: Anastasia Kovaleva <a.kovaleva@yadro.com>
To: <target-devel@vger.kernel.org>
Cc: <njavali@marvell.com>, <GR-QLogic-Storage-Upstream@marvell.com>,
<James.Bottomley@HansenPartnership.com>,
<martin.petersen@oracle.com>, <bvanassche@acm.org>,
<quinn.tran@cavium.com>, <himanshu.madhani@oracle.com>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux@yadro.com>, <hare@suse.de>, <stable@vger.kernel.org>
Subject: [PATCH v3 3/3] scsi: qla2xxx: Remove incorrect trap
Date: Thu, 10 Oct 2024 19:32:37 +0300 [thread overview]
Message-ID: <20241010163236.27969-4-a.kovaleva@yadro.com> (raw)
In-Reply-To: <20241010163236.27969-1-a.kovaleva@yadro.com>
This BUG_ON() is triggered when there is no fc_port with a certain
loop ID in the scsi host vp_fcports list, but there is one in
lport_loopid_map. As these two data structures do not change
simultaneously and atomically, such a trap is invalid.
Cc: stable@vger.kernel.org
Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
Signed-off-by: Anastasia Kovaleva <a.kovaleva@yadro.com>
Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
---
drivers/scsi/qla2xxx/qla_target.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 0a82360141f8..6f359677f554 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -5190,15 +5190,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha,
ql_dbg(ql_dbg_disc, vha, 0x20fc,
"%s: logo %llx res %d sess %p ",
__func__, wwn, res, sess);
- if (res == 0) {
- /*
- * cmd went upper layer, look for qlt_xmit_tm_rsp()
- * for LOGO_ACK & sess delete
- */
- BUG_ON(!sess);
- res = 0;
- } else {
- /* cmd did not go to upper layer. */
+ if (res) {
if (sess) {
qlt_schedule_sess_for_deletion(sess);
res = 0;
--
2.40.1
next prev parent reply other threads:[~2024-10-10 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 16:32 [PATCH v3 0/3] Fix bugs in qla2xxx driver Anastasia Kovaleva
2024-10-10 16:32 ` [PATCH v3 1/3] scsi: qla2xxx: Drop starvation counter on success Anastasia Kovaleva
2024-10-10 16:32 ` [PATCH v3 2/3] scsi: qla2xxx: Make target send correct LOGO Anastasia Kovaleva
2024-10-10 16:36 ` kernel test robot
2024-10-10 16:32 ` Anastasia Kovaleva [this message]
2024-11-01 9:38 ` [PATCH v3 0/3] Fix bugs in qla2xxx driver Anastasia Kovaleva
2024-11-11 10:28 ` Anastasia Kovaleva
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=20241010163236.27969-4-a.kovaleva@yadro.com \
--to=a.kovaleva@yadro.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=himanshu.madhani@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@yadro.com \
--cc=martin.petersen@oracle.com \
--cc=njavali@marvell.com \
--cc=quinn.tran@cavium.com \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
/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