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: <20251217112403.21df7955@gandalf.local.home>
Date: Wed, 17 Dec 2025 11:24:03 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Fushuai Wang <fushuai.wang@...ux.dev>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, dietmar.eggemann@....com, bsegall@...gle.com,
 mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org,
 wangfushuai@...du.com
Subject: Re: [PATCH RESEND] sched/topology: Convert kzalloc() to kcalloc()
 in topology.c

On Wed, 17 Dec 2025 21:05:45 +0800
Fushuai Wang <fushuai.wang@...ux.dev> wrote:

> @@ -2096,7 +2096,7 @@ void sched_init_numa(int offline_node)
>  	/* Compute default topology size */
>  	for (i = 0; sched_domain_topology[i].mask; i++);
>  
> -	tl = kzalloc((i + nr_levels + 1) *
> +	tl = kcalloc((i + nr_levels + 1),
>  			sizeof(struct sched_domain_topology_level), GFP_KERNEL);

I like the conversion, but here you can lose the parenthesis:

	tl = kcalloc(i + nr_levels + 1,
 			sizeof(struct sched_domain_topology_level), GFP_KERNEL);

-- Steve


>  	if (!tl)
>  		return;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ