All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <GR-QLogic-Storage-Upstream@marvell.com>
Subject: [PATCH 06/10] qla2xxx: Fix imbalance vha->vref_count
Date: Tue, 12 Jul 2022 22:20:41 -0700	[thread overview]
Message-ID: <20220713052045.10683-7-njavali@marvell.com> (raw)
In-Reply-To: <20220713052045.10683-1-njavali@marvell.com>

From: Quinn Tran <qutran@marvell.com>

vref_count took an extra decrement in the task management path.
Add an extra ref count to compensate the imbalance.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 15fb5ed565c0..83fae4c341ee 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -168,6 +168,7 @@ int qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait)
 	struct srb_iocb *abt_iocb;
 	srb_t *sp;
 	int rval = QLA_FUNCTION_FAILED;
+	uint8_t bail;
 
 	/* ref: INIT for ABTS command */
 	sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport,
@@ -175,6 +176,7 @@ int qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait)
 	if (!sp)
 		return QLA_MEMORY_ALLOC_FAILED;
 
+	QLA_VHA_MARK_BUSY(vha, bail);
 	abt_iocb = &sp->u.iocb_cmd;
 	sp->type = SRB_ABT_CMD;
 	sp->name = "abort";
@@ -2018,12 +2020,14 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
 	struct srb_iocb *tm_iocb;
 	srb_t *sp;
 	int rval = QLA_FUNCTION_FAILED;
+	uint8_t bail;
 
 	/* ref: INIT */
 	sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
 	if (!sp)
 		goto done;
 
+	QLA_VHA_MARK_BUSY(vha, bail);
 	sp->type = SRB_TM_CMD;
 	sp->name = "tmf";
 	qla2x00_init_async_sp(sp, qla2x00_get_async_timeout(vha),
-- 
2.19.0.rc0


  parent reply	other threads:[~2022-07-13  5:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  5:20 [PATCH 00/10] qla2xxx bug fixes Nilesh Javali
2022-07-13  5:20 ` [PATCH 01/10] Revert "scsi: qla2xxx: Fix disk failure to rediscover" Nilesh Javali
2022-07-13  5:20 ` [PATCH 02/10] qla2xxx: Fix incorrect display of max frame size Nilesh Javali
2022-07-13  5:20 ` [PATCH 03/10] qla2xxx: zero undefined mailbox IN registers Nilesh Javali
2022-07-13  5:20 ` [PATCH 04/10] qla2xxx: Fix response queue handler reading stale packets Nilesh Javali
2022-07-13  5:20 ` [PATCH 05/10] qla2xxx: edif: Fix dropped IKE message Nilesh Javali
2022-07-13  5:20 ` Nilesh Javali [this message]
2022-07-13  5:20 ` [PATCH 07/10] qla2xxx: Fix discovery issues in FC-AL topology Nilesh Javali
2022-07-13  5:20 ` [PATCH 08/10] qla2xxx: fix sparse warning for dport_data Nilesh Javali
2022-07-13  5:20 ` [PATCH 09/10] qla2xxx: update manufacturer details Nilesh Javali
2022-07-13  5:20 ` [PATCH 10/10] qla2xxx: Update version to 10.02.07.800-k Nilesh Javali
2022-07-13 19:14 ` [PATCH 00/10] qla2xxx bug fixes Himanshu Madhani
2022-07-14  4:19 ` Martin K. Petersen
2022-07-19  3:08 ` Martin K. Petersen

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=20220713052045.10683-7-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --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.