net: netlink: remove the cb_mutex "injection" from netlink core
authorJakub Kicinski <kuba@kernel.org>
Thu, 6 Jun 2024 19:29:06 +0000 (12:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2024 12:15:40 +0000 (13:15 +0100)
commit5fbf57a937f418fe204f9dbb7735e91984f4ee6a
treef2cdf5b7f859f94ba167da7a98d364d8fb5358c0
parent5380d64f8d766576ac5c0f627418b2d0e1d2641f
net: netlink: remove the cb_mutex "injection" from netlink core

Back in 2007, in commit af65bdfce98d ("[NETLINK]: Switch cb_lock spinlock
to mutex and allow to override it") netlink core was extended to allow
subsystems to replace the dump mutex lock with its own lock.

The mechanism was used by rtnetlink to take rtnl_lock but it isn't
sufficiently flexible for other users. Over the 17 years since
it was added no other user appeared. Since rtnetlink needs conditional
locking now, and doesn't use it either, axe this feature complete.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h
net/netlink/af_netlink.c