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>] [day] [month] [year] [list]
Message-Id: <0b3495e0-dd8d-3269-39fe-9f29d751f74b@au1.ibm.com>
Date:   Wed, 16 Aug 2017 15:32:19 +1000
From:   Andrew Donnellan <andrew.donnellan@....ibm.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        manoj@...ux.vnet.ibm.com, mrochs@...ux.vnet.ibm.com,
        ukrishn@...ux.vnet.ibm.com, jejb@...ux.vnet.ibm.com,
        martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] scsi: cxlflash: Fix an error handling path in
 'cxlflash_disk_attach()'

On 16/08/17 06:18, Christophe JAILLET wrote:
> 'rc' is known to be 0 at this point.
> If 'create_context()' fails, returns -ENOMEM instead of 0 which means
> success.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

ENOMEM seems right here.

Reviewed-by: Andrew Donnellan <andrew.donnellan@....ibm.com>

> ---
>   drivers/scsi/cxlflash/superpipe.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c
> index ad0f9968ccfb..08da593cb2f6 100644
> --- a/drivers/scsi/cxlflash/superpipe.c
> +++ b/drivers/scsi/cxlflash/superpipe.c
> @@ -1390,6 +1390,7 @@ static int cxlflash_disk_attach(struct scsi_device *sdev,
>   	if (unlikely(!ctxi)) {
>   		dev_err(dev, "%s: Failed to create context ctxid=%d\n",
>   			__func__, ctxid);
> +		rc = -ENOMEM;
>   		goto err;
>   	}
>   
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@....ibm.com  IBM Australia Limited

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ