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] [day] [month] [year] [list]
Message-ID: <90e260c2-34f7-e156-0c36-6ff00c91311b@interlog.com>
Date:   Thu, 11 Mar 2021 21:32:43 -0500
From:   Douglas Gilbert <dgilbert@...erlog.com>
To:     Colin King <colin.king@...onical.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] scsi: sg: return -ENOMEM on out of memory error

On 2021-03-11 6:33 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The sg_proc_seq_show_debug should return -ENOMEM on an
> out of memory error rather than -1. Fix this.
> 
> Fixes: 94cda6cf2e44 ("scsi: sg: Rework debug info")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Acked-by: Douglas Gilbert <dgilbert@...erlog.com>

Thanks.

> ---
>   drivers/scsi/sg.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index 79f05afa4407..85e86cbc6891 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -4353,7 +4353,7 @@ sg_proc_seq_show_debug(struct seq_file *s, void *v)
>   	if (!bp) {
>   		seq_printf(s, "%s: Unable to allocate %d on heap, finish\n",
>   			   __func__, bp_len);
> -		return -1;
> +		return -ENOMEM;
>   	}
>   	read_lock_irqsave(&sg_index_lock, iflags);
>   	sdp = it ? sg_lookup_dev(it->index) : NULL;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ