]> git.hungrycats.org Git - linux/commit
scsi: qla2xxx: Prevent command send on chip reset
authorQuinn Tran <qutran@marvell.com>
Tue, 27 Feb 2024 16:41:17 +0000 (22:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:11:56 +0000 (15:11 +0200)
commit6c6bf6cacf9461f8d301cfac4f9c175d80cbcc63
treeae2d49bfbba866fb6c0d594b0f1e49804b317e42
parentbc2b57b0a682a33e5a17afccc0e7840af6d28697
scsi: qla2xxx: Prevent command send on chip reset

commit 4895009c4bb72f71f2e682f1e7d2c2d96e482087 upstream.

Currently IOCBs are allowed to push through while chip reset could be in
progress. During chip reset the outstanding_cmds array is cleared
twice. Once when any command on this array is returned as failed and
secondly when the array is initialize to zero. If a command is inserted on
to the array between these intervals, then the command will be lost.  Check
for chip reset before sending IOCB.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20240227164127.36465-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_iocb.c