summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov2015-10-12 21:47:05 +0200
committerDavid S. Miller2015-10-13 13:57:58 +0200
commitf409d0ed87d2721e1099ce36266e98c5aea2d486 (patch)
treeebe13617bfc4b22390d6a73f73f9a1db9b20deb6 /net/bridge/br_if.c
parentbridge: vlan: drop unnecessary flush code (diff)
downloadkernel-qcow2-linux-f409d0ed87d2721e1099ce36266e98c5aea2d486.tar.gz
kernel-qcow2-linux-f409d0ed87d2721e1099ce36266e98c5aea2d486.tar.xz
kernel-qcow2-linux-f409d0ed87d2721e1099ce36266e98c5aea2d486.zip
bridge: vlan: move back vlan_flush
Ido Schimmel reported a problem with switchdev devices because of the order change of del_nbp operations, more specifically the move of nbp_vlan_flush() which deletes all vlans and frees vlgrp after the rx_handler has been unregistered. So in order to fix this move vlan_flush back where it was and make it destroy the rhtable after NULLing vlgrp and waiting a grace period to make sure noone can see it. Reported-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 934cae9fa317..45e4757c6fd2 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -248,6 +248,7 @@ static void del_nbp(struct net_bridge_port *p)
list_del_rcu(&p->list);
+ nbp_vlan_flush(p);
br_fdb_delete_by_port(br, p, 0, 1);
nbp_update_port_count(br);
@@ -256,8 +257,6 @@ static void del_nbp(struct net_bridge_port *p)
dev->priv_flags &= ~IFF_BRIDGE_PORT;
netdev_rx_handler_unregister(dev);
- /* use the synchronize_rcu done by netdev_rx_handler_unregister */
- nbp_vlan_flush(p);
br_multicast_del_port(p);