mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
net: hold instance lock around NETDEV_DOWN/GOING_DOWN
Mirror what call_netdevice_register_net_notifiers does but for the teardown. Cover only DOWN and GOING_DOWN. UNREGISTER is still unlocked because of the SW devices using dev_xxx methods. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20260702224150.3730033-2-sdf@fomichev.me Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
997bfb05c9
commit
5326fefb9f
|
|
@ -1912,9 +1912,11 @@ static void call_netdevice_unregister_notifiers(struct notifier_block *nb,
|
|||
struct net_device *dev)
|
||||
{
|
||||
if (dev->flags & IFF_UP) {
|
||||
netdev_lock_ops(dev);
|
||||
call_netdevice_notifier(nb, NETDEV_GOING_DOWN,
|
||||
dev);
|
||||
call_netdevice_notifier(nb, NETDEV_DOWN, dev);
|
||||
netdev_unlock_ops(dev);
|
||||
}
|
||||
call_netdevice_notifier(nb, NETDEV_UNREGISTER, dev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user