]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: clean up dev_snmp6 proc entry when we fail to initialize inet6_dev
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 4 Nov 2015 13:47:53 +0000 (14:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:06 +0000 (14:31 -0500)
commitf6f9261a75f09b4fe7eb20a8c3f01391148d82a1
treee730f2d302ee42577ed214afbdeccab876d2597e
parent1ce33c2bcc40c6ccc47fdd35d2afcf8e5c74ba66
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>
net/ipv6/addrconf.c