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: <aRQ408dXG888TKQo@shredder>
Date: Wed, 12 Nov 2025 09:35:47 +0200
From: Ido Schimmel <idosch@...dia.com>
To: Zilin Guan <zilin@....edu.cn>
Cc: petrm@...dia.com, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	jianhao.xu@....edu.cn
Subject: Re: [PATCH] mlxsw: spectrum: Fix memory leak in
 mlxsw_sp_flower_stats()

On Wed, Nov 12, 2025 at 05:21:14AM +0000, Zilin Guan wrote:
> The function mlxsw_sp_flower_stats() calls mlxsw_sp_acl_ruleset_get() to
> obtain a ruleset reference. If the subsequent call to
> mlxsw_sp_acl_rule_lookup() fails to find a rule, the function returns
> an error without releasing the ruleset reference, causing a memory leak.
> 
> Fix this by using a goto to the existing error handling label, which
> calls mlxsw_sp_acl_ruleset_put() to properly release the reference.
> 
> Fixes: 7c1b8eb175b69 ("mlxsw: spectrum: Add support for TC flower offload statistics")
> Signed-off-by: Zilin Guan <zilin@....edu.cn>

Reviewed-by: Ido Schimmel <idosch@...dia.com>

Subject prefix should be "[PATCH net]". See [1] for next time.

Thanks

[1] https://docs.kernel.org/process/maintainer-netdev.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ