提交 5777b7f0 编写于 作者: M Mike Christie 提交者: Martin K. Petersen

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.comReviewed-by: NManish Rangankar <mrangankar@marvell.com>
Signed-off-by: NMike Christie <michael.christie@oracle.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 a1f3486b
...@@ -1453,7 +1453,7 @@ static void qedi_tmf_work(struct work_struct *work) ...@@ -1453,7 +1453,7 @@ static void qedi_tmf_work(struct work_struct *work)
ldel_exit: ldel_exit:
spin_lock_bh(&qedi_conn->tmf_work_lock); 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); list_del_init(&list_work->list);
qedi_cmd->list_tmf_work = NULL; qedi_cmd->list_tmf_work = NULL;
kfree(list_work); kfree(list_work);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册