Re: [PATCH] mlxsw: fix refcount leak in mlxsw_sp_vrs_lpm_tree_replace()

From: patchwork-bot+netdevbpf

Date: Thu Jun 11 2026 - 19:02:16 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Tue, 9 Jun 2026 08:47:30 +0000 you wrote:
> When mlxsw_sp_vrs_lpm_tree_replace() fails after replacing some VRs,
> the error rollback loop does not correctly revert the preceding
> replacements. The loop decrements the index but fails to update the
> vr pointer, which still points to the VR that caused the failure. As
> a result, the condition and the rollback call always operate on the
> same VR, potentially calling mlxsw_sp_vr_lpm_tree_replace() multiple
> times on it while never rolling back the earlier VRs. Those VRs
> continue to hold a reference to new_tree acquired via
> mlxsw_sp_lpm_tree_hold(), leaking the reference count of new_tree.
>
> [...]

Here is the summary with links:
- mlxsw: fix refcount leak in mlxsw_sp_vrs_lpm_tree_replace()
https://git.kernel.org/netdev/net-next/c/21cf8dc478a4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html