diff options
-rw-r--r-- | net/bridge/br_if.c | 1 | ||||
-rw-r--r-- | net/core/dev.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index d5147ddd70b..1bacca4cb67 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -147,6 +147,7 @@ static void del_nbp(struct net_bridge_port *p) dev->priv_flags &= ~IFF_BRIDGE_PORT; netdev_rx_handler_unregister(dev); + synchronize_net(); netdev_set_master(dev, NULL); diff --git a/net/core/dev.c b/net/core/dev.c index d94537914a7..bcb05cb799c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4294,10 +4294,8 @@ int netdev_set_master(struct net_device *slave, struct net_device *master) slave->master = master; - if (old) { - synchronize_net(); + if (old) dev_put(old); - } return 0; } EXPORT_SYMBOL(netdev_set_master); |