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@cavium.com>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux@yadro.com>, <hare@suse.de>, <stable@vger.kernel.org>
Subject: [PATCH v2 3/3] scsi: qla2xxx: Remove incorrect trap
Date: Wed, 9 Oct 2024 14:16:54 +0300 [thread overview]
Message-ID: <20241009111654.4697-4-a.kovaleva@yadro.com> (raw)
In-Reply-To: <20241009111654.4697-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>
---
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 bc6b014eb422..492fc1627354 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-09 11:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 11:16 [PATCH v2 0/3] Fix bugs in qla2xxx driver Anastasia Kovaleva
2024-10-09 11:16 ` [PATCH v2 1/3] scsi: qla2xxx: Drop starvation counter on success Anastasia Kovaleva
2024-10-10 14:57 ` kernel test robot
2024-10-10 16:39 ` kernel test robot
2024-10-09 11:16 ` [PATCH v2 2/3] scsi: qla2xxx: Make target send correct LOGO Anastasia Kovaleva
2024-10-09 11:20 ` kernel test robot
2024-10-09 11:16 ` Anastasia Kovaleva [this message]
2024-10-09 19:28 ` [PATCH v2 0/3] Fix bugs in qla2xxx driver Himanshu Madhani
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=20241009111654.4697-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@cavium.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 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.