]> www.infradead.org Git - users/hch/misc.git/commit
nexthop: Convert RTM_DELNEXTHOP to per-netns RTNL.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 19 Mar 2025 23:06:52 +0000 (16:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Mar 2025 14:32:00 +0000 (07:32 -0700)
commit29c8e323320f2a1c54d7dfb0937255fa8c2ff901
treef7e0db8b201191607ada8f535212a87092ad1f12
parentf5fabaff86cbb049dbb149c91d21807069d38de3
nexthop: Convert RTM_DELNEXTHOP to per-netns RTNL.

In rtm_del_nexthop(), only nexthop_find_by_id() and remove_nexthop()
require RTNL as they touch net->nexthop.rb_root.

Let's move RTNL down as rtnl_net_lock() before nexthop_find_by_id().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250319230743.65267-8-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c