summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorShuangpeng Bai <shuangpeng.kernel@gmail.com>2026-07-27 14:53:39 -0400
committerJakub Kicinski <kuba@kernel.org>2026-07-29 16:49:39 -0700
commit93cad1f6bd1e27c75c4a5ab000c2a2fc01181ccf (patch)
treed1bc239e726fe8f664042bbb8678811c452a708c /include/linux
parentfc9c7ca5fcbf7fe3bcba87d1ff72f0009071ba86 (diff)
ipv6: release fib6_null_entry on subtree failure
When adding a source-specific route creates a new subtree, fib6_add() installs fib6_null_entry as the temporary leaf of the new subtree root and takes a fib6_info reference for that holder. If adding the first source leaf fails, the code frees the just allocated subtree root but leaves that hold behind. fib6_null_entry is a per-netns sentinel and is freed directly at netns teardown, so this does not keep the object alive. However, it leaves its visible refcount permanently elevated and can eventually saturate the refcount on repeated failures. Drop the null-entry reference before freeing the unlinked subtree root. Fixes: 5ea715289af6 ("ipv6: broadly use fib6_info_hold() helper") Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://patch.msgid.link/20260727185339.1545169-1-shuangpeng.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions