diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2010-09-24 09:55:52 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-26 19:09:25 -0700 |
commit | 2cc6d2bf3d6195fabcf0febc192c01f99519a8f3 (patch) | |
tree | 6fbbaa255617783eda308a00a21065bc99ad0d21 /include/net | |
parent | bc68580d41b131396054a1a04a7df4948555ed97 (diff) | |
download | talos-op-linux-2cc6d2bf3d6195fabcf0febc192c01f99519a8f3.tar.gz talos-op-linux-2cc6d2bf3d6195fabcf0febc192c01f99519a8f3.zip |
ipv6: add a missing unregister_pernet_subsys call
Clean up a missing exit path in the ipv6 module init routines. In
addrconf_init we call ipv6_addr_label_init which calls register_pernet_subsys
for the ipv6_addr_label_ops structure. But if module loading fails, or if the
ipv6 module is removed, there is no corresponding unregister_pernet_subsys call,
which leaves a now-bogus address on the pernet_list, leading to oopses in
subsequent registrations. This patch cleans up both the failed load path and
the unload path. Tested by myself with good results.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
include/net/addrconf.h | 1 +
net/ipv6/addrconf.c | 11 ++++++++---
net/ipv6/addrlabel.c | 5 +++++
3 files changed, 14 insertions(+), 3 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/addrconf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 45375b41a2a0..4d40c4d0230b 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -121,6 +121,7 @@ static inline int addrconf_finite_timeout(unsigned long timeout) * IPv6 Address Label subsystem (addrlabel.c) */ extern int ipv6_addr_label_init(void); +extern void ipv6_addr_label_cleanup(void); extern void ipv6_addr_label_rtnl_register(void); extern u32 ipv6_addr_label(struct net *net, const struct in6_addr *addr, |