]> www.infradead.org Git - users/hch/block.git/commitdiff
bridge: vlan: use synchronize_net() when holding RTNL
authorEric Dumazet <edumazet@google.com>
Fri, 9 Feb 2024 15:30:58 +0000 (15:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Feb 2024 12:17:02 +0000 (12:17 +0000)
br_vlan_flush() and nbp_vlan_flush() should use synchronize_net()
instead of syncronize_rcu() to release RTNL sooner.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_vlan.c

index 15f44d026e75a8818f958703c5ec054eaafc4d94..9c2fffb827ab195cf9a01281e4790361e0b14bfe 100644 (file)
@@ -841,7 +841,7 @@ void br_vlan_flush(struct net_bridge *br)
        vg = br_vlan_group(br);
        __vlan_flush(br, NULL, vg);
        RCU_INIT_POINTER(br->vlgrp, NULL);
-       synchronize_rcu();
+       synchronize_net();
        __vlan_group_free(vg);
 }
 
@@ -1372,7 +1372,7 @@ void nbp_vlan_flush(struct net_bridge_port *port)
        vg = nbp_vlan_group(port);
        __vlan_flush(port->br, port, vg);
        RCU_INIT_POINTER(port->vlgrp, NULL);
-       synchronize_rcu();
+       synchronize_net();
        __vlan_group_free(vg);
 }