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] [day] [month] [year] [list]
Date:   Thu, 1 Dec 2016 20:36:08 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Felix Jia <felix.jia@...iedtelesis.co.nz>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Carl Smith <carl.smith@...iedtelesis.co.nz>
Subject: Re: [PATCH main-v4.9-rc7] net/ipv6: allow sysctl to change link-local
 address generation mode

On Thu, Dec 1, 2016 at 6:14 PM, Felix Jia <felix.jia@...iedtelesis.co.nz> wrote:
> +static void addrconf_addrgenmode_change(struct net *net)
> +{
> +       struct net_device *dev;
> +       struct inet6_dev *idev;
> +
> +       read_lock(&dev_base_lock);
> +       for_each_netdev(net, dev) {
> +               rcu_read_lock();
> +               idev = __in6_dev_get(dev);
> +               if (idev) {
> +                       idev->cnf.addrgenmode = ipv6_devconf_dflt.addrgenmode;
> +                       idev->addr_gen_mode = ipv6_devconf_dflt.addrgenmode;
> +                       rtnl_lock();
> +                       addrconf_dev_config(idev->dev);
> +                       rtnl_unlock();

You can't call rtnl lock in atomic context.

> +               }
> +               rcu_read_unlock();
> +       }
> +       read_unlock(&dev_base_lock);

Did you test your patch seriously?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ