net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_net().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 6 Jan 2025 07:07:50 +0000 (16:07 +0900)
committerJakub Kicinski <kuba@kernel.org>
Wed, 8 Jan 2025 01:49:20 +0000 (17:49 -0800)
commitca779f40654a046613ea812126055f161844f17b
tree12cf80b9ea6813716d942626815aed2650fe5da5
parenta239e0625097bccdd4065390952fe9e6d0fdf02b
net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_net().

(un)?register_netdevice_notifier_net() hold RTNL before triggering the
notifier for all netdev in the netns.

Let's convert the RTNL to rtnl_net_lock().

Note that the per-netns netdev notifier is protected by per-netns RTNL.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250106070751.63146-3-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c