summaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2025-04-01 12:07:08 -0700
committerJakub Kicinski <kuba@kernel.org>2025-04-02 17:17:22 -0700
commit1b7fdc702c031134c619b74c4f311c590e50ca3d (patch)
treeed088cde714fef27efdd43b897e6b429bd3788bb /net/unix/garbage.c
parentca9e5d3d9a4d7d30355aa68bb30dc6f850f067ab (diff)
downloadlinux-1b7fdc702c031134c619b74c4f311c590e50ca3d.tar.gz
linux-1b7fdc702c031134c619b74c4f311c590e50ca3d.tar.bz2
linux-1b7fdc702c031134c619b74c4f311c590e50ca3d.zip
rtnetlink: Use register_pernet_subsys() in rtnl_net_debug_init().
rtnl_net_debug_init() registers rtnl_net_debug_net_ops by register_pernet_device() but calls unregister_pernet_subsys() in case register_netdevice_notifier() fails. It corrupts pernet_list because first_device is updated in register_pernet_device() but not unregister_pernet_subsys(). Let's fix it by calling register_pernet_subsys() instead. The _subsys() one fits better for the use case because it keeps the notifier alive until default_device_exit_net(), giving it more chance to test NETDEV_UNREGISTER. Fixes: 03fa53485659 ("rtnetlink: Add ASSERT_RTNL_NET() placeholder for netdev notifier.") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250401190716.70437-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions