Joakim Tjernlund/Transmode wrote on 2010/11/08 16:19:35: > > Trying to hunt down an rtnl_lock bug, br_add_bridge looks funny, it > takes the rtnl_lock but doesn't release it in case of error. Bug? ehh, missed that last goto out; So no imbalance, sorry for the noise > > int br_add_bridge(struct net *net, const char *name) > { > struct net_device *dev; > int ret; > > dev = new_bridge_dev(net, name); > if (!dev) > return -ENOMEM; > > rtnl_lock(); > if (strchr(dev->name, '%')) { > ret = dev_alloc_name(dev, dev->name); > if (ret < 0) > goto out_free; > } > > SET_NETDEV_DEVTYPE(dev, &br_type); > > ret = register_netdevice(dev); > if (ret) > goto out_free; > > ret = br_sysfs_addbr(dev); > if (ret) > unregister_netdevice(dev); > out: > rtnl_unlock(); > return ret; > > out_free: > free_netdev(dev); > goto out; > } _______________________________________________ Bridge mailing list Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/bridge