aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 832a561500d9..497df086141a 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -441,12 +441,16 @@ int br_del_if(struct net_bridge *br, struct net_device *dev)
441 441
442void __exit br_cleanup_bridges(void) 442void __exit br_cleanup_bridges(void)
443{ 443{
444 struct net_device *dev, *nxt; 444 struct net_device *dev;
445 445
446 rtnl_lock(); 446 rtnl_lock();
447 for_each_netdev_safe(&init_net, dev, nxt) 447restart:
448 if (dev->priv_flags & IFF_EBRIDGE) 448 for_each_netdev(&init_net, dev) {
449 if (dev->priv_flags & IFF_EBRIDGE) {
449 del_br(dev->priv); 450 del_br(dev->priv);
451 goto restart;
452 }
453 }
450 rtnl_unlock(); 454 rtnl_unlock();
451 455
452} 456}