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]
Message-ID: <b12b56a9-2d20-4802-bbc8-43f4831b3113@embeddedor.com>
Date: Fri, 5 Jan 2024 12:17:18 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Erick Archer <erick.archer@....com>, "Rafael J. Wysocki"
 <rafael@...nel.org>, Len Brown <len.brown@...el.com>,
 Pavel Machek <pavel@....cz>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>, "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-hardening@...r.kernel.org
Subject: Re: [PATCH] PM / QOS: Use kcalloc() instead of kzalloc()



On 1/5/24 12:11, Erick Archer wrote:
> Use 2-factor multiplication argument form kcalloc() instead
> of kzalloc().
> 
> Link: https://github.com/KSPP/linux/issues/162
> Signed-off-by: Erick Archer <erick.archer@....com>

Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>

Thanks!
-- 
Gustavo

> ---
>   drivers/base/power/qos.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
> index 8e93167f1783..bd77f6734f14 100644
> --- a/drivers/base/power/qos.c
> +++ b/drivers/base/power/qos.c
> @@ -201,7 +201,7 @@ static int dev_pm_qos_constraints_allocate(struct device *dev)
>   	if (!qos)
>   		return -ENOMEM;
> 
> -	n = kzalloc(3 * sizeof(*n), GFP_KERNEL);
> +	n = kcalloc(3, sizeof(*n), GFP_KERNEL);
>   	if (!n) {
>   		kfree(qos);
>   		return -ENOMEM;
> --
> 2.42.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ