diff options
author | [email protected] <[email protected]> | 2013-08-06 12:40:16 +0200 |
---|---|---|
committer | David S. Miller <[email protected]> | 2013-08-08 22:31:21 -0700 |
commit | b20903f2a9ee5bd9ca80ad72867c8d137aaf4d62 (patch) | |
tree | 447006c4670fbdad8c92e8b2976fd3dd00eca902 | |
parent | 1ff412ad7714f6952f76ffd77f0a7f2f563288a1 (diff) |
bonding: unwind on bond_add_vlan failure
In case of bond_add_vlan() failure currently we'll have the vlan's
refcnt bumped up in all slaves, but it will never go down because it
failed to get added to the bond, so properly unwind the added vlan if
bond_add_vlan fails.
Signed-off-by: Nikolay Aleksandrov <[email protected]>
Acked-by: Veaceslav Falico <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 78b0aeb13545..4264a7631cba 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -455,13 +455,13 @@ static int bond_vlan_rx_add_vid(struct net_device *bond_dev, if (res) { pr_err("%s: Error: Failed to add vlan id %d\n", bond_dev->name, vid); - return res; + goto unwind; } return 0; unwind: - /* unwind from head to the slave that failed */ + /* unwind from the slave that failed */ bond_for_each_slave_continue_reverse(bond, slave) vlan_vid_del(slave->dev, proto, vid); |