diff options
author | Joe Jin <joe.jin@oracle.com> | 2007-02-20 04:30:15 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-26 14:42:44 -0500 |
commit | ca17c23345308a8692a65a0cca363d9108a665ca (patch) | |
tree | c000cdaf425d45706935d6b8a3ff878bf58cd7cf /net/ipv6/af_inet6.c | |
parent | d3f23dfe8bbb6bf352a208755e4ff2806315067b (diff) |
[IPV6]: Adjust inet6_exit() cleanup sequence against inet6_init()
This patch for adjust inet6_exit() to inverse sequence to inet6_init().
At ipv6_init, it first create proc_root/net/dev_snmp6 entry by call
ipv6_misc_proc_init(), then call addrconf_init() to create the corresponding
device entry at this directory, but at inet6_exit, ipv6_misc_proc_exit()
called first, then call addrconf_init().
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 3585d8fa7f02..5cac14a5c778 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -929,25 +929,28 @@ static void __exit inet6_exit(void) | |||
929 | { | 929 | { |
930 | /* First of all disallow new sockets creation. */ | 930 | /* First of all disallow new sockets creation. */ |
931 | sock_unregister(PF_INET6); | 931 | sock_unregister(PF_INET6); |
932 | |||
933 | /* Cleanup code parts. */ | ||
934 | ipv6_packet_cleanup(); | ||
935 | #ifdef CONFIG_IPV6_MIP6 | ||
936 | mip6_fini(); | ||
937 | #endif | ||
938 | addrconf_cleanup(); | ||
939 | ip6_flowlabel_cleanup(); | ||
940 | ip6_route_cleanup(); | ||
932 | #ifdef CONFIG_PROC_FS | 941 | #ifdef CONFIG_PROC_FS |
942 | |||
943 | /* Cleanup code parts. */ | ||
933 | if6_proc_exit(); | 944 | if6_proc_exit(); |
934 | ac6_proc_exit(); | 945 | ac6_proc_exit(); |
935 | ipv6_misc_proc_exit(); | 946 | ipv6_misc_proc_exit(); |
936 | udp6_proc_exit(); | ||
937 | udplite6_proc_exit(); | 947 | udplite6_proc_exit(); |
948 | udp6_proc_exit(); | ||
938 | tcp6_proc_exit(); | 949 | tcp6_proc_exit(); |
939 | raw6_proc_exit(); | 950 | raw6_proc_exit(); |
940 | #endif | 951 | #endif |
941 | #ifdef CONFIG_IPV6_MIP6 | ||
942 | mip6_fini(); | ||
943 | #endif | ||
944 | /* Cleanup code parts. */ | ||
945 | ip6_flowlabel_cleanup(); | ||
946 | addrconf_cleanup(); | ||
947 | ip6_route_cleanup(); | ||
948 | ipv6_packet_cleanup(); | ||
949 | igmp6_cleanup(); | ||
950 | ipv6_netfilter_fini(); | 952 | ipv6_netfilter_fini(); |
953 | igmp6_cleanup(); | ||
951 | ndisc_cleanup(); | 954 | ndisc_cleanup(); |
952 | icmpv6_cleanup(); | 955 | icmpv6_cleanup(); |
953 | #ifdef CONFIG_SYSCTL | 956 | #ifdef CONFIG_SYSCTL |
@@ -955,6 +958,7 @@ static void __exit inet6_exit(void) | |||
955 | #endif | 958 | #endif |
956 | cleanup_ipv6_mibs(); | 959 | cleanup_ipv6_mibs(); |
957 | proto_unregister(&rawv6_prot); | 960 | proto_unregister(&rawv6_prot); |
961 | proto_unregister(&udplitev6_prot); | ||
958 | proto_unregister(&udpv6_prot); | 962 | proto_unregister(&udpv6_prot); |
959 | proto_unregister(&tcpv6_prot); | 963 | proto_unregister(&tcpv6_prot); |
960 | } | 964 | } |