lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 29 Nov 2020 16:47:04 +0000
From:   Michael Kelley <mikelley@...rosoft.com>
To:     Jing Xiangfeng <jingxiangfeng@...wei.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        Long Li <longli@...rosoft.com>, cavery <cavery@...hat.com>
CC:     "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: storvsc: Fix error return in storvsc_probe()

From: Jing Xiangfeng <jingxiangfeng@...wei.com> Sent: Thursday, November 26, 2020 7:02 PM
> 
> Fix to return a error code "-ENOMEM" from the error handling case
> instead of 0.
> 
> Fixes: 436ad9413353 ("scsi: storvsc: Allow only one remove lun work item to be issued per
> lun")
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
> ---
>  drivers/scsi/storvsc_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 0c65fbd41035..ded00a89bfc4 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1994,8 +1994,10 @@ static int storvsc_probe(struct hv_device *device,
>  			alloc_ordered_workqueue("storvsc_error_wq_%d",
>  						WQ_MEM_RECLAIM,
>  						host->host_no);
> -	if (!host_dev->handle_error_wq)
> +	if (!host_dev->handle_error_wq) {
> +		ret = -ENOMEM;
>  		goto err_out2;
> +	}
>  	INIT_WORK(&host_dev->host_scan_work, storvsc_host_scan);
>  	/* Register the HBA and start the scsi bus scan */
>  	ret = scsi_add_host(host, &device->device);
> --
> 2.22.0

Reviewed-by: Michael Kelley <mikelley@...rosoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ