lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152234048028.19153.843006403471156320.stgit@localhost.localdomain>
Date:   Thu, 29 Mar 2018 19:21:20 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     dledford@...hat.com, jgg@...pe.ca, davem@...emloft.net,
        pablo@...filter.org, kadlec@...ckhole.kfki.hu, fw@...len.de,
        pshelar@....org, johannes@...solutions.net, paul@...l-moore.com,
        sds@...ho.nsa.gov, eparis@...isplace.org, jmorris@...ei.org,
        serge@...lyn.com, leon@...nel.org, yuval.shaia@...cle.com,
        parav@...lanox.com, danielj@...lanox.com, ktkhai@...tuozzo.com,
        majd@...lanox.com, nicolas.dichtel@...nd.com, vyasevic@...hat.com,
        paulmck@...ux.vnet.ibm.com, vyasevich@...il.com,
        gregkh@...uxfoundation.org, daniel@...earbox.net,
        jakub.kicinski@...ronome.com, ast@...nel.org, brouer@...hat.com,
        linux@...musvillemoes.dk, john.fastabend@...il.com,
        dsahern@...il.com, jiri@...lanox.com, idosch@...lanox.com,
        vvs@...tuozzo.com, avagin@...tuozzo.com, roman.kapl@...go.com,
        lucien.xin@...il.com, christian.brauner@...ntu.com,
        jbenc@...hat.com, pombredanne@...b.com, linux-rdma@...r.kernel.org,
        netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
        coreteam@...filter.org, dev@...nvswitch.org,
        linux-wireless@...r.kernel.org, selinux@...ho.nsa.gov,
        linux-security-module@...r.kernel.org
Subject: [PATCH net-next 5/5] 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: Kirill Tkhai <ktkhai@...tuozzo.com>
---
 net/netfilter/nf_conntrack_core.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 370f9b7f051b..41ff04ee2554 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ