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: <87ms751z28.wl-kuninori.morimoto.gx@renesas.com>
Date: Mon, 8 Sep 2025 02:02:39 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: chenyuan_fl@....com
Cc: geert+renesas@...der.be,
	mturquette@...libre.com,
	sboyd@...nel.org,
	linux-renesas-soc@...r.kernel.org,
	linux-clk@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Yuan CHen <chenyuan@...inos.cn>
Subject: Re: [PATCH v2] clk: renesas: fix memory leak in cpg_mssr_reserved_init()


Hi chenyuan

Thank you for the patch

> In the current implementation, when krealloc_array() fails, the error handling path
> incorrectly sets the original memory pointer to NULL before it is freed,
> resulting in a memory leak during reallocation failure.
> 
> Fixes: 6aa17547649 ("clk: renesas: cpg-mssr: Ignore all clocks assigned to non-Linux system")
> Signed-off-by: Yuan CHen <chenyuan@...inos.cn>

You want to use ${LINUX}/scripts/checkpatch.pl to get maximum 75 chars warning

Patch itself is agree, but I still don't understand the git-log.

	incorrectly sets the original memory pointer to NULL before it is freed,

I still don't understand this part. which part are you talking about ?
What does this "original memory pointer" mean ? And what does this "freed"
mean ? freed what ??

I guess you want to indicate is like this ?

	In case of krealloc_array() failure, current error handling just
	returns from function without freeing alloced array.
	It cause a memory leak. Fixup it.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ