]> www.infradead.org Git - users/willy/pagecache.git/commit
net: no longer hold RTNL while calling flush_all_backlogs()
authorEric Dumazet <edumazet@google.com>
Tue, 14 Jan 2025 20:55:29 +0000 (20:55 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jan 2025 03:17:04 +0000 (19:17 -0800)
commitcfa579f6665635b72d4a075fc91eb144c2b0f74e
treecb297b2af4cee9f67e6f8410455987a3298a53fb
parent8a2b61e9e87936649073e287242ccdcbfb636906
net: no longer hold RTNL while calling flush_all_backlogs()

flush_all_backlogs() is called from unregister_netdevice_many_notify()
as part of netdevice dismantles.

This is currently called under RTNL, and can last up to 50 ms
on busy hosts.

There is no reason to hold RTNL at this stage, if our caller
is cleanup_net() : netns are no more visible, devices
are in NETREG_UNREGISTERING state and no other thread
could mess our state while RTNL is temporarily released.

In order to provide isolation, this patch provides a separate
'net_todo_list' for cleanup_net().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jesse Brandeburg <jbrandeburg@cloudflare.com>
Link: https://patch.msgid.link/20250114205531.967841-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c