public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
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>, <nab@linux-iscsi.org>,
	<himanshu.madhani@cavium.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux@yadro.com>
Subject: [PATCH 3/3] scsi: qla2xxx: Remove incorrect trap
Date: Tue, 8 Oct 2024 16:24:02 +0300	[thread overview]
Message-ID: <20241008132402.26164-4-a.kovaleva@yadro.com> (raw)
In-Reply-To: <20241008132402.26164-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>
---
 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 bc7feef6ee79..9a5dbd00de01 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


  parent reply	other threads:[~2024-10-08 13:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 13:23 [PATCH 0/3] Fix bugs in qla2xxx driver Anastasia Kovaleva
2024-10-08 13:24 ` [PATCH 1/3] scsi: qla2xxx: Drop starvation counter on success Anastasia Kovaleva
2024-10-09  6:30   ` Hannes Reinecke
2024-10-08 13:24 ` [PATCH 2/3] scsi: qla2xxx: make target send correct LOGO Anastasia Kovaleva
2024-10-09  6:32   ` Hannes Reinecke
2024-10-08 13:24 ` Anastasia Kovaleva [this message]
2024-10-09  6:33   ` [PATCH 3/3] scsi: qla2xxx: Remove incorrect trap Hannes Reinecke

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=20241008132402.26164-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=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=nab@linux-iscsi.org \
    --cc=njavali@marvell.com \
    --cc=quinn.tran@cavium.com \
    --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