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

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

parents 5d0aff8d 4d19a8f1
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1621,16 +1621,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);
}