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-next>] [day] [month] [year] [list]
Message-ID: <152242784495.18864.4373352355749698367.stgit@localhost.localdomain>
Date:   Fri, 30 Mar 2018 19:38:16 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     davem@...emloft.net, zhangshengju@...s.chinamobile.com,
        ktkhai@...tuozzo.com, jakub.kicinski@...ronome.com,
        dsahern@...il.com, mschiffer@...verse-factory.net,
        daniel@...earbox.net, netdev@...r.kernel.org
Subject: [PATCH RESEND net-next 0/2] net_rwsem fixes

(Forgot to CC netdev@ :)

Hi,

there is wext_netdev_notifier_call()->wireless_nlevent_flush()
netdevice notifier, which takes net_rwsem, so we can't take
net_rwsem in {,un}register_netdevice_notifier().

Since {,un}register_netdevice_notifier() is executed under
pernet_ops_rwsem, net_namespace_list can't change, while we
holding it, so there is no need net_rwsem in these functions [1/2].

The same is in [2/2]. We make callers of __rtnl_link_unregister()
take pernet_ops_rwsem, and close the race with setup_net()
and cleanup_net(), so __rtnl_link_unregister() does not need it.
This also fixes the problem of that __rtnl_link_unregister() does
not see initializing and exiting nets.

Thanks,
Kirill
---

Kirill Tkhai (2):
      net: Remove net_rwsem from {,un}register_netdevice_notifier()
      net: Do not take net_rwsem in __rtnl_link_unregister()


 drivers/net/dummy.c      |    2 ++
 drivers/net/ifb.c        |    2 ++
 net/core/dev.c           |    5 -----
 net/core/net_namespace.c |    1 +
 net/core/rtnetlink.c     |    6 +++---
 5 files changed, 8 insertions(+), 8 deletions(-)

--
Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ