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: <2aaf169a-3dab-4ddc-a095-396619983406@tuxon.dev>
Date: Sat, 8 Nov 2025 12:00:01 +0200
From: Claudiu Beznea <claudiu.beznea@...on.dev>
To: Sidharth Seela <sidharthseela@...il.com>, mturquette@...libre.com,
 sboyd@...nel.org, nicolas.ferre@...rochip.com,
 alexandre.belloni@...tlin.com, varshini.rajendran@...rochip.com
Cc: linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, skhan@...uxfoundation.org,
 david.hunter.linux@...il.com
Subject: Re: [PATCH RESEND] clk: at91: sam9x7: Use kmalloc_array() instead of
 kmalloc()

Hi, Sidharth,

On 9/24/25 17:55, Sidharth Seela wrote:
> Replace kmalloc with kmalloc array in clk/at91/sam9x7.c. Refactor to new
> API, for cases with dynamic size calculations inside kmalloc().
> 
> Resend is to correct previously sent patches mailing address.
> 
> Signed-off-by: Sidharth Seela <sidharthseela@...il.com>
> ---
> diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c
> index ffab32b047a0..0c0a746a183d 100644
> --- a/drivers/clk/at91/sam9x7.c
> +++ b/drivers/clk/at91/sam9x7.c
> @@ -748,9 +748,9 @@ static void __init sam9x7_pmc_setup(struct device_node *np)
>  	if (!sam9x7_pmc)
>  		return;
>  
> -	clk_mux_buffer = kmalloc(sizeof(void *) *
> -				 (ARRAY_SIZE(sam9x7_gck)),
> -				 GFP_KERNEL);
> +	clk_mux_buffer = kmalloc_array(ARRAY_SIZE(sam9x7_gck),
> +					sizeof(void *),

sizeof(*clk_mux_buffer)

Also, this line should be aligned on the above "(". Please run checkpatch.pl.

Could you please update the other at91 clock drivers?

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst

> +					GFP_KERNEL);

This like could fit on the above one.

Thank you,
Claudiu

>  	if (!clk_mux_buffer)
>  		goto err_free;
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ