diff options
| author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2017-01-19 16:26:21 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 11:51:30 +0200 |
| commit | e450a7d4b9603956a98e80b54906a214bb4c50ed (patch) | |
| tree | d6eb3eae77bd51fe6de7279b6fde9d994ca5a0f8 /net | |
| parent | 5a3e5272f629930ed09f675a7ea10fb9a3e2322d (diff) | |
ipv6: addrconf: Avoid addrconf_disable_change() using RCU read-side lock
commit 03e4deff4987f79c34112c5ba4eb195d4f9382b0 upstream.
Just like commit 4acd4945cd1e ("ipv6: addrconf: Avoid calling
netdevice notifiers with RCU read-side lock"), it is unnecessary
to make addrconf_disable_change() use RCU iteration over the
netdev list, since it already holds the RTNL lock, or we may meet
Illegal context switch in RCU read-side critical section.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 530f7c7d9..4fe335a72 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -4889,8 +4889,7 @@ static void addrconf_disable_change(struct net *net, __s32 newf) struct net_device *dev; struct inet6_dev *idev; - rcu_read_lock(); - for_each_netdev_rcu(net, dev) { + for_each_netdev(net, dev) { idev = __in6_dev_get(dev); if (idev) { int changed = (!idev->cnf.disable_ipv6) ^ (!newf); @@ -4899,7 +4898,6 @@ static void addrconf_disable_change(struct net *net, __s32 newf) dev_disable_change(idev); } } - rcu_read_unlock(); } static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf) |
