diff mbox series

[07/10] qla2xxx: Remove unintended flag clearing

Message ID 20221214045014.19362-8-njavali@marvell.com (mailing list archive)
State Superseded
Headers show
Series Misc. qla2xxx driver bug fixes | expand

Commit Message

Nilesh Javali Dec. 14, 2022, 4:50 a.m. UTC
From: Quinn Tran <qutran@marvell.com>

FCF_ASYNC_SENT flag is used in session management. This flag
is cleared in task management path by accident.
Remove unintended flag clearing.

Fixes: 388a49959ee4 ("scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd")
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 | 1 -
 1 file changed, 1 deletion(-)

Comments

Himanshu Madhani Dec. 15, 2022, 5:38 p.m. UTC | #1
> On Dec 13, 2022, at 8:50 PM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Quinn Tran <qutran@marvell.com>
> 
> FCF_ASYNC_SENT flag is used in session management. This flag
> is cleared in task management path by accident.
> Remove unintended flag clearing.
> 
> Fixes: 388a49959ee4 ("scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd")
> 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 | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 745fee298d56..6968e8d08968 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -2082,7 +2082,6 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
> done_free_sp:
> 	/* ref: INIT */
> 	kref_put(&sp->cmd_kref, qla2x00_sp_release);
> -	fcport->flags &= ~FCF_ASYNC_SENT;
> done:
> 	return rval;
> }
> -- 
> 2.19.0.rc0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 745fee298d56..6968e8d08968 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2082,7 +2082,6 @@  qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
 done_free_sp:
 	/* ref: INIT */
 	kref_put(&sp->cmd_kref, qla2x00_sp_release);
-	fcport->flags &= ~FCF_ASYNC_SENT;
 done:
 	return rval;
 }