Unverified Commit d008aa0d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11268 net: bridge: mcast: wait for previous gc cycles when removing port

parents df41305a 5d530fa8
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1618,16 +1618,14 @@ void br_multicast_del_port(struct net_bridge_port *port)
{
	struct net_bridge *br = port->br;
	struct net_bridge_port_group *pg;
	HLIST_HEAD(deleted_head);
	struct hlist_node *n;

	/* Take care of the remaining groups, only perm ones should be left */
	spin_lock_bh(&br->multicast_lock);
	hlist_for_each_entry_safe(pg, n, &port->mglist, mglist)
		br_multicast_find_del_pg(br, pg);
	hlist_move_list(&br->mcast_gc_list, &deleted_head);
	spin_unlock_bh(&br->multicast_lock);
	br_multicast_gc(&deleted_head);
	flush_work(&br->mcast_gc_work);
	del_timer_sync(&port->multicast_router_timer);
	free_percpu(port->mcast_stats);
}