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: <660498d6-3526-4f1c-99d8-776fa9967747@acm.org>
Date: Fri, 22 Aug 2025 12:47:42 -0700
From: Bart Van Assche <bvanassche@....org>
To: Abinash Singh <abinashsinghlalotra@...il.com>,
 martin.petersen@...cle.com, James.Bottomley@...senPartnership.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
 dlemoal@...nel.org
Subject: Re: [PATCH v8 1/2] scsi: sd: Fix build warning in
 sd_revalidate_disk()

On 8/20/25 7:45 AM, Abinash Singh wrote:
> +	lim = kmalloc(sizeof(*lim), GFP_KERNEL);
> +	if (!lim) {
> +		sd_printk(KERN_WARNING, sdkp,
> +			"sd_revalidate_disk: Disk limit allocation failure.\n");
> +		goto out;
> +	}

 From Documentation/process/coding-style.rst:

These generic allocation functions all emit a stack dump on failure when 
used
without __GFP_NOWARN so there is no use in emitting an additional failure
message when NULL is returned.

>   	buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL);
>   	if (!buffer) {
>   		sd_printk(KERN_WARNING, sdkp, "sd_revalidate_disk: Memory "

Has this example perhaps been followed? I think it is safe to remove
this sd_printk() statement.

Otherwise this patch looks good to me.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ