RE: [EXT] [PATCH 02/13] scsi: qedi: fix null ref during abort handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Mike Christie <michael.christie@xxxxxxxxxx>
> Sent: Sunday, April 11, 2021 12:10 AM
> To: lduncan@xxxxxxxx; martin.petersen@xxxxxxxxxx; Manish Rangankar
> <mrangankar@xxxxxxxxxxx>; Santosh Vernekar <svernekar@xxxxxxxxxxx>;
> linux-scsi@xxxxxxxxxxxxxxx; jejb@xxxxxxxxxxxxx
> Cc: Mike Christie <michael.christie@xxxxxxxxxx>
> Subject: [EXT] [PATCH 02/13] scsi: qedi: fix null ref during abort handling
> 
> External Email
> 
> ----------------------------------------------------------------------
> 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.
> 
> Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
> ---
>  drivers/scsi/qedi/qedi_fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 @@ static void qedi_tmf_work(struct work_struct *work)
> 
>  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);
> --
> 2.25.1

Thanks,
Reviewed-by: Manish Rangankar <mrangankar@xxxxxxxxxxx>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux