summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedi
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2021-05-25 13:18:12 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-02 01:28:22 -0400
commit5777b7f0f03ce49372203b6521631f62f2810c8f (patch)
tree32d7e833aebbf559d8eb77626c39cdf84eb66672 /drivers/scsi/qedi
parenta1f3486b3b095ed2259d7a1fc021a8b6e72a5365 (diff)
scsi: qedi: Fix null ref during abort handling
If qedi_process_cmd_cleanup_resp finds the cmd it frees the work and sets list_tmf_work to NULL, so qedi_tmf_work should check if list_tmf_work is non-NULL when it wants to force cleanup. Link: https://lore.kernel.org/r/20210525181821.7617-20-michael.christie@oracle.com Reviewed-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi')
-rw-r--r--drivers/scsi/qedi/qedi_fw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
index 440ddd2309f1..cf57b4e49700 100644
--- a/drivers/scsi/qedi/qedi_fw.c
+++ b/drivers/scsi/qedi/qedi_fw.c
@@ -1453,7 +1453,7 @@ abort_ret:
ldel_exit:
spin_lock_bh(&qedi_conn->tmf_work_lock);
- if (!qedi_cmd->list_tmf_work) {
+ if (qedi_cmd->list_tmf_work) {
list_del_init(&list_work->list);
qedi_cmd->list_tmf_work = NULL;
kfree(list_work);