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]
Date: Fri, 19 Apr 2024 11:58:42 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Jonathan Hunter <jonathanh@...dia.com>,
	Julia Lawall <julia.lawall@...ia.fr>, linux-pm@...r.kernel.org,
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH next] cpupfreq: tegra124: eliminate uses of of_node_put()

On 07-04-24, 22:15, Javier Carrasco wrote:
> Make use of the __free() cleanup handler to automatically free nodes
> when they get out of scope. Only the probe function is affected by this
> modification.
> 
> Given that this mechanism requires the node to be initialized, its
> initialization and the value check have been moved to the top of the
> function.
> 
> After removing uses of of_node_put(), the jump to out_put_np is no
> longer necessary.
> 
> Suggested-by: Julia Lawall <julia.lawall@...ia.fr>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
> This patch is a proof of concept to remove uses of of_node_put() in
> cpufreq, which can be replaced with the clenaup handler introduced with
> 54da6a092431 ("locking: Introduce __cleanup() based infrastructure").
> 
> This change provides a scope-based cleanup mechanism to avoid potential
> memory leaks that can appear if of_node_put() is not used correctly.
> 
> The patch is based on the latest linux-next tag (next-20240405).
> ---
>  drivers/cpufreq/tegra124-cpufreq.c | 19 ++++++-------------
>  1 file changed, 6 insertions(+), 13 deletions(-)

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ