]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qedi: Fix list_del corruption while removing active I/O
authorNilesh Javali <njavali@marvell.com>
Tue, 8 Sep 2020 09:56:52 +0000 (02:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Sep 2020 02:40:21 +0000 (22:40 -0400)
commit7104e829860d72c9440d36b930ecb05174b14f30
treeb20c5c823cc7da3823814cd456195c94284eebd1
parent6204b1e57ad33416d3b16acd7d79cd432e02ad45
scsi: qedi: Fix list_del corruption while removing active I/O

While aborting the I/O, the firmware cleanup task timed out and driver
deleted the I/O from active command list. Some time later the firmware
sent the cleanup task response and driver again deleted the I/O from
active command list causing firmware to send completion for non-existent
I/O and list_del corruption of active command list.

Add fix to check if I/O is present before deleting it from the active
command list to ensure firmware sends valid I/O completion and protect
against list_del corruption.

Link: https://lore.kernel.org/r/20200908095657.26821-4-mrangankar@marvell.com
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedi/qedi_fw.c