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

Commit 152f2531 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by David S. Miller
Browse files

net: Remove rtnl_lock() in nf_ct_iterate_destroy()



rtnl_lock() doesn't protect net::ct::count,
and it's not needed for__nf_ct_unconfirmed_destroy()
and for nf_queue_nf_hook_drop().

Signed-off-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ec9c7809
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1763,7 +1763,6 @@ nf_ct_iterate_destroy(int (*iter)(struct nf_conn *i, void *data), void *data)
{
	struct net *net;

	rtnl_lock();
	down_read(&net_rwsem);
	for_each_net(net) {
		if (atomic_read(&net->ct.count) == 0)
@@ -1772,7 +1771,6 @@ nf_ct_iterate_destroy(int (*iter)(struct nf_conn *i, void *data), void *data)
		nf_queue_nf_hook_drop(net);
	}
	up_read(&net_rwsem);
	rtnl_unlock();

	/* Need to wait for netns cleanup worker to finish, if its
	 * running -- it might have deleted a net namespace from