From: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx> commit 1438f5d07b9a7afb15e1d0e26df04a6fd4e56a3c upstream. A call to rtnl_nets_destroy() is needed to release references taken on netns put in rtnl_nets. CC: stable@xxxxxxxxxxxxxxx Fixes: 636af13f213b ("rtnetlink: Register rtnl_dellink() and rtnl_setlink() with RTNL_FLAG_DOIT_PERNET_WIP.") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx> Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> Link: https://patch.msgid.link/20250205221037.2474426-1-nicolas.dichtel@xxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3423,6 +3423,7 @@ static int rtnl_setlink(struct sk_buff * err = -ENODEV; rtnl_nets_unlock(&rtnl_nets); + rtnl_nets_destroy(&rtnl_nets); errout: return err; } Patches currently in stable-queue which might be from nicolas.dichtel@xxxxxxxxx are queue-6.13/rtnetlink-fix-netns-leak-with-rtnl_setlink.patch