[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191216174843.248552703@linuxfoundation.org>
Date: Mon, 16 Dec 2019 18:49:43 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Himanshu Madhani <hmadhani@...vell.com>,
Bart Van Assche <bvanassche@....org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.3 143/180] scsi: qla2xxx: Make qla2x00_abort_srb() again decrease the sp reference count
From: Bart Van Assche <bvanassche@....org>
[ Upstream commit d2d2b5a5741d317bed1fa38211f1f3b142d8cf7a ]
Since qla2x00_abort_srb() starts with increasing the reference count of
@sp, decrease that same reference count before returning.
Cc: Himanshu Madhani <hmadhani@...vell.com>
Fixes: 219d27d7147e ("scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands") # v5.2.
Signed-off-by: Bart Van Assche <bvanassche@....org>
Tested-by: Himanshu Madhani <hmadhani@...vell.com>
Reviewed-by: Himanshu Madhani <hmadhani@...vell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/scsi/qla2xxx/qla_os.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index ef75897b27132..82f6ae4dcfc0b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1751,6 +1751,8 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
spin_lock_irqsave(qp->qp_lock_ptr, *flags);
sp->comp = NULL;
}
+
+ atomic_dec(&sp->ref_count);
}
static void
--
2.20.1
Powered by blists - more mailing lists