* [PATCH net] bridge: Fix error path in nbp_vlan_init
@ 2017-03-01 14:50 Yotam Gigi
2017-03-01 18:25 ` Roopa Prabhu via Bridge
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yotam Gigi @ 2017-03-01 14:50 UTC (permalink / raw)
To: stephen, davem, bridge, netdev, idosch, eladr, jiri, roopa; +Cc: Yotam Gigi
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>
---
net/bridge/br_vlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 62e68c0..b838213 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -997,10 +997,10 @@ int nbp_vlan_init(struct net_bridge_port *p)
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;
--
2.4.11
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] bridge: Fix error path in nbp_vlan_init
2017-03-01 14:50 [PATCH net] bridge: Fix error path in nbp_vlan_init Yotam Gigi
@ 2017-03-01 18:25 ` Roopa Prabhu via Bridge
2017-03-01 19:14 ` Jiri Pirko
2017-03-01 22:56 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Roopa Prabhu via Bridge @ 2017-03-01 18:25 UTC (permalink / raw)
To: Yotam Gigi; +Cc: idosch, netdev, bridge, jiri, eladr, davem
On 3/1/17, 6:50 AM, Yotam Gigi wrote:
> 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>
Thanks yotam.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] bridge: Fix error path in nbp_vlan_init
2017-03-01 14:50 [PATCH net] bridge: Fix error path in nbp_vlan_init Yotam Gigi
2017-03-01 18:25 ` Roopa Prabhu via Bridge
@ 2017-03-01 19:14 ` Jiri Pirko
2017-03-01 22:56 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-01 19:14 UTC (permalink / raw)
To: Yotam Gigi; +Cc: stephen, davem, bridge, netdev, idosch, eladr, jiri, roopa
Wed, Mar 01, 2017 at 03:50:45PM CET, yotamg@mellanox.com wrote:
>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>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] bridge: Fix error path in nbp_vlan_init
2017-03-01 14:50 [PATCH net] bridge: Fix error path in nbp_vlan_init Yotam Gigi
2017-03-01 18:25 ` Roopa Prabhu via Bridge
2017-03-01 19:14 ` Jiri Pirko
@ 2017-03-01 22:56 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-01 22:56 UTC (permalink / raw)
To: yotamg; +Cc: stephen, bridge, netdev, idosch, eladr, jiri, roopa
From: Yotam Gigi <yotamg@mellanox.com>
Date: Wed, 1 Mar 2017 16:50:45 +0200
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-01 22:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01 14:50 [PATCH net] bridge: Fix error path in nbp_vlan_init Yotam Gigi
2017-03-01 18:25 ` Roopa Prabhu via Bridge
2017-03-01 19:14 ` Jiri Pirko
2017-03-01 22:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox