]> www.infradead.org Git - users/dwmw2/linux.git/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, 10 Apr 2024 14:19:33 +0000 (16:19 +0200)
commit7861213201838480dc222634c56fb6db113d010d
treed098b656be6b4d67c9b7ed2fd21f6fb6f9ee4db4
parentf18f5fcdaa8cce37a4f52f34d8bb40a00291ebe7
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