]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mpls: Drop RTNL for RTM_NEWROUTE, RTM_DELROUTE, and RTM_GETROUTE.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 29 Oct 2025 17:33:05 +0000 (17:33 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Nov 2025 01:40:54 +0000 (17:40 -0800)
commit7d99a7c6c6a3d0d6456520baa85d58095bf262ee
tree2c460ed9ef84fd7e754d6f17d362d104bc61ad2e
parente833eb25161aae6cd0caf14782f405d0ed5765ed
mpls: Drop RTNL for RTM_NEWROUTE, RTM_DELROUTE, and RTM_GETROUTE.

RTM_NEWROUTE looks up dev under RCU (ip_route_output(),
ipv6_stub->ipv6_dst_lookup_flow(), netdev_get_by_index()),
and each neighbour holds the refcnt of its dev.

Also, net->mpls.platform_label is protected by a dedicated
per-netns mutex.

Now, no MPLS code depends on RTNL.

Let's drop RTNL for RTM_NEWROUTE, RTM_DELROUTE, and RTM_GETROUTE.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/20251029173344.2934622-14-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mpls/af_mpls.c