Re: [PATCH 08/18] snic: use reserved commands

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

 



On 5/3/21 8:03 AM, Hannes Reinecke wrote:
> @@ -2170,42 +2144,42 @@ snic_device_reset(struct scsi_cmnd *sc)
>  		goto dev_rst_end;
>  	}
>  
> -	/* There is no tag when lun reset is issue through ioctl. */
> -	if (unlikely(tag <= SNIC_NO_TAG)) {
> -		SNIC_HOST_INFO(snic->shost,
> -			       "Devrst: LUN Reset Recvd thru IOCTL.\n");
> +	reset_sc = scsi_get_internal_cmd(sc->device, REQ_OP_SCSI_IN,
> +					 BLK_MQ_REQ_NOWAIT);
> +	if (!reset_sc)
> +		goto dev_rst_end;

The SCSI error handler may call .eh_device_reset_handler and other error
handling callbacks if no tags are available. If no tags are available,
scsi_get_internal_cmd() will fail. If scsi_get_internal_cmd() fails,
snic_device_reset() will fail. Does that count as a regression?

Thanks,

Bart.



[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