summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorYotam Gigi <yotamg@mellanox.com>2017-03-01 16:50:45 +0200
committerDavid S. Miller <davem@davemloft.net>2017-03-01 14:55:28 -0800
commitdf2c43343b47a7138431f431118eb5819e205365 (patch)
tree668f9643a5ada03d2f52827756b081320d77228b /net/bridge
parent3b45a4106f146c336cbcaccb9d8d0fa0e5c3dc1d (diff)
downloadlinux-df2c43343b47a7138431f431118eb5819e205365.tar.gz
linux-df2c43343b47a7138431f431118eb5819e205365.tar.bz2
linux-df2c43343b47a7138431f431118eb5819e205365.zip
bridge: Fix error path in nbp_vlan_init
Fix error path order in nbp_vlan_init, so if switchdev_port_attr_set call failes, the vlan_hash wouldn't be destroyed before inited. Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") CC: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_vlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 62e68c0dc687..b838213c408e 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -997,10 +997,10 @@ err_vlan_add:
RCU_INIT_POINTER(p->vlgrp, NULL);
synchronize_rcu();
vlan_tunnel_deinit(vg);
-err_vlan_enabled:
err_tunnel_init:
rhashtable_destroy(&vg->vlan_hash);
err_rhtbl:
+err_vlan_enabled:
kfree(vg);
goto out;