[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpV_7X_ON0XLkd+b3cMRDpg0kN8opPWzx=CfxGGCcNqQQA@mail.gmail.com>
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