[IPV6]: Add ndisc_netdev_notifier unregister.
authorDmitry Mishin <dim@openvz.org>
Sat, 4 Nov 2006 00:08:19 +0000 (16:08 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 5 Nov 2006 22:11:33 +0000 (14:11 -0800)
If inet6_init() fails later than ndisc_init() call, or IPv6 module is
unloaded, ndisc_netdev_notifier call remains in the list and will follows in
oops later.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ndisc.c

index 41a8a5f..73eb8c3 100644 (file)
@@ -1742,6 +1742,7 @@ int __init ndisc_init(struct net_proto_family *ops)
 
 void ndisc_cleanup(void)
 {
+       unregister_netdevice_notifier(&ndisc_netdev_notifier);
 #ifdef CONFIG_SYSCTL
        neigh_sysctl_unregister(&nd_tbl.parms);
 #endif