diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2015-11-04 16:47:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-09 22:34:09 +0300 |
commit | 35b2aa1c3c36ba20d7f58b77a1e590af7b7d6c1f (patch) | |
tree | b86d81ed158d6c0b89a08b0659c04ada7a703c85 /net/ipv6 | |
parent | 2e05a9e795039ff20784f0be4a609bfc28ca9d20 (diff) | |
download | linux-35b2aa1c3c36ba20d7f58b77a1e590af7b7d6c1f.tar.xz |
ipv6: clean up dev_snmp6 proc entry when we fail to initialize inet6_dev
[ Upstream commit 2a189f9e57650e9f310ddf4aad75d66c1233a064 ]
In ipv6_add_dev, when addrconf_sysctl_register fails, we do not clean up
the dev_snmp6 entry that we have already registered for this device.
Call snmp6_unregister_dev in this case.
Fixes: a317a2f19da7d ("ipv6: fail early when creating netdev named all or default")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 36b85bd05ac8..dd00828863a0 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -417,6 +417,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev) if (err) { ipv6_mc_destroy_dev(ndev); del_timer(&ndev->regen_timer); + snmp6_unregister_dev(ndev); goto err_release; } /* protected by rtnl_lock */ |