bridge: vlan: use synchronize_net() when holding RTNL

JIRA: https://issues.redhat.com/browse/RHEL-57739

commit 48ebf6ebbc91a6e6b2c0ac1217573e81b37ef2ab
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri Feb 9 15:30:58 2024 +0000

    bridge: vlan: use synchronize_net() when holding RTNL

    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>

Signed-off-by: Jamie Bainbridge <jbainbri@redhat.com>
This commit is contained in:
Jamie Bainbridge 2024-09-05 18:04:59 +10:00
parent b4d6838f39
commit deb9264fc1
1 changed files with 2 additions and 2 deletions

View 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);
}