]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: Add net_passive_inc() and net_passive_dec().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 12 Aug 2025 18:32:05 +0000 (14:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:30:56 +0000 (18:30 +0200)
commit2b260dc923e8b77f700d9f990c074449c67ee0cb
tree948ed2c32ca182fcc21d24ddb559a7ffdc91e805
parent130362b4b39d6c9363254ca0be7874a17f20bd79
net: Add net_passive_inc() and net_passive_dec().

[ Upstream commit e57a6320215c3967f51ab0edeff87db2095440e4 ]

net_drop_ns() is NULL when CONFIG_NET_NS is disabled.

The next patch introduces a function that increments
and decrements net->passive.

As a prep, let's rename and export net_free() to
net_passive_dec() and add net_passive_inc().

Suggested-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/netdev/CANn89i+oUCt2VGvrbrweniTendZFEh+nwS=uonc004-aPkWy-Q@mail.gmail.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250217191129.19967-2-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 59b33fab4ca4 ("smb: client: fix netns refcount leak after net_passive changes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/net_namespace.h
net/core/net_namespace.c