diff options
author | Eric Dumazet <edumazet@google.com> | 2012-08-22 21:50:59 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-23 09:24:42 -0700 |
commit | 748e2d9396a18c3fd3d07d47c1b41320acf1fbf4 (patch) | |
tree | 49bde8c370615258baada1d43acda2b3fb3625c2 /net/ipv6 | |
parent | 0fa7fa98dbcc2789409ed24e885485e645803d7f (diff) | |
download | blackbird-op-linux-748e2d9396a18c3fd3d07d47c1b41320acf1fbf4.tar.gz blackbird-op-linux-748e2d9396a18c3fd3d07d47c1b41320acf1fbf4.zip |
net: reinstate rtnl in call_netdevice_notifiers()
Eric Biederman pointed out that not holding RTNL while calling
call_netdevice_notifiers() was racy.
This patch is a direct transcription his feedback
against commit 0115e8e30d6fc (net: remove delay at device dismantle)
Thanks Eric !
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e581009cb09e..6bc85f7c31e3 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2566,14 +2566,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, void *data) { struct net_device *dev = (struct net_device *) data; - struct inet6_dev *idev; + struct inet6_dev *idev = __in6_dev_get(dev); int run_pending = 0; int err; - if (event == NETDEV_UNREGISTER_FINAL) - return NOTIFY_DONE; - - idev = __in6_dev_get(dev); switch (event) { case NETDEV_REGISTER: if (!idev && dev->mtu >= IPV6_MIN_MTU) { |