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:   Tue, 26 Apr 2022 08:46:17 -0400
From:   "Martin K. Petersen" <martin.petersen@...cle.com>
To:     Enze Li <lienze@...inos.cn>
Cc:     jejb@...ux.ibm.com, martin.petersen@...cle.com,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: sr: add handling of memory allocation failure in
 get_capabilities


Enze,

> @@ -669,8 +669,9 @@ static int sr_probe(struct device *dev)
>  
>  	sdev->sector_size = 2048;	/* A guess, just in case */
>  
> -	/* FIXME: need to handle a get_capabilities failure properly ?? */
> -	get_capabilities(cd);
> +	error = -ENOMEM;
> +	if (get_capabilities(cd))
> +		goto fail_put;

Shouldn't this be 'goto fail_minor;'?

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ