]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:49:16 +0000 (14:49 +0100)
commita475cfecb54e1b2798cdb4cc5c97edb3db9bcea4
treeba815e3fb7a91dc9c7abe0d31bfe6879d8dbcfb3
parentde2882f1ac134a42edb69bc7467bffa0ea9c02f7
scsi: qedi: Fix list_del corruption while removing active I/O

BugLink: https://bugs.launchpad.net/bugs/1902115
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/scsi/qedi/qedi_fw.c