]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Oct 2020 09:38:31 +0000 (10:38 +0100)
commit565ecf536c49b568a5754560a27536e1ac5b174b
tree879279db35eb47e15ab3c8d166b7982e044fa8a9
parentd0260f611c0816f2dc6fbf68ff8cb8cfdb028854
scsi: qedi: Fix list_del corruption while removing active I/O

[ Upstream commit 28b35d17f9f8573d4646dd8df08917a4076a6b63 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/qedi/qedi_fw.c