]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: revert RTNL changes in unregister_netdevice_many_notify()
authorEric Dumazet <edumazet@google.com>
Wed, 29 Jan 2025 14:27:26 +0000 (14:27 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jan 2025 16:57:18 +0000 (08:57 -0800)
commite759e1e4a4bd2926d082afe56046a90224433a31
tree0f28319a37685067be547d64588eccda9b78640a
parent0f5697f1a3f99bc2b674b8aa3c5da822c5673c11
net: revert RTNL changes in unregister_netdevice_many_notify()

This patch reverts following changes:

83419b61d187 net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2)
ae646f1a0bb9 net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1)
cfa579f66656 net: no longer hold RTNL while calling flush_all_backlogs()

This caused issues in layers holding a private mutex:

cleanup_net()
  rtnl_lock();
mutex_lock(subsystem_mutex);

unregister_netdevice();

   rtnl_unlock(); // LOCKDEP violation
   rtnl_lock();

I will revisit this in next cycle, opt-in for the new behavior
from safe contexts only.

Fixes: cfa579f66656 ("net: no longer hold RTNL while calling flush_all_backlogs()")
Fixes: ae646f1a0bb9 ("net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1)")
Fixes: 83419b61d187 ("net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2)")
Reported-by: syzbot+5b9196ecf74447172a9a@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6789d55f.050a0220.20d369.004e.GAE@google.com/
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250129142726.747726-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c