]> git.ipfire.org Git - thirdparty/linux.git/commit
rtnetlink: do not use RTNL in rtnl_af_register() and rtnl_af_unregister()
authorEric Dumazet <edumazet@google.com>
Thu, 21 May 2026 17:40:38 +0000 (17:40 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 23 May 2026 00:32:56 +0000 (17:32 -0700)
commitb8de39a06535bfccf9f693e42dc8cfbee35d07be
tree786c2d9e9f331ee9db097e53c89919b008275520
parent24822968aa928ab087fc612ec1c6d2751ec91a4a
rtnetlink: do not use RTNL in rtnl_af_register() and rtnl_af_unregister()

rtnl_af_lookup() does not rely on RTNL anymoe, remove the stale
ASSERT_RTNL().

Add a private spinlock (rtnl_af_ops_lock) to protect rtnl_af_ops
list instead of using RTNL.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260521174038.204481-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/rtnetlink.c