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: <152234046913.19153.5014546114733288472.stgit@localhost.localdomain>
Date:   Thu, 29 Mar 2018 19:21:09 +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 4/5] ovs: Remove rtnl_lock() from ovs_exit_net()

Here we iterate for_each_net() and removes
vport from alive net to the exiting net.

ovs_net::dps are protected by ovs_mutex(),
and the others, who change it (ovs_dp_cmd_new(),
__dp_destroy()) also take it.
The same with datapath::ports list.

So, we remove rtnl_lock() here.

Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
---
 net/openvswitch/datapath.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 9746ee30a99b..015e24e08909 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -2363,12 +2363,10 @@ static void __net_exit ovs_exit_net(struct net *dnet)
 	list_for_each_entry_safe(dp, dp_next, &ovs_net->dps, list_node)
 		__dp_destroy(dp);
 
-	rtnl_lock();
 	down_read(&net_rwsem);
 	for_each_net(net)
 		list_vports_from_net(net, dnet, &head);
 	up_read(&net_rwsem);
-	rtnl_unlock();
 
 	/* Detach all vports from given namespace. */
 	list_for_each_entry_safe(vport, vport_next, &head, detach_list) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ