Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0b00685 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Minimizing the synchronize_rcu() calls in SSR code flow"

parents 8cb649a1 1340a15d
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -268,6 +268,7 @@ static void rmnet_force_unassociate_device(struct net_device *dev)
	struct rmnet_port *port;
	unsigned long bkt_ep;
	LIST_HEAD(list);
	HLIST_HEAD(cleanup_list);

	if (!rmnet_is_real_dev_registered(real_dev))
		return;
@@ -284,7 +285,13 @@ static void rmnet_force_unassociate_device(struct net_device *dev)
		rmnet_vnd_dellink(ep->mux_id, port, ep);

		hlist_del_init_rcu(&ep->hlnode);
		hlist_add_head(&ep->hlnode, &cleanup_list);
	}

	synchronize_rcu();

	hlist_for_each_entry_safe(ep, tmp_ep, &cleanup_list, hlnode) {
		hlist_del(&ep->hlnode);
		kfree(ep);
	}
	/* Unregistering devices in context before freeing port.