diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-13 20:35:39 -0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 15:59:43 -0700 |
commit | 725ba8eee3881e619c8e5a0116f1bdb6480ac2d9 (patch) | |
tree | e4d92f0fcbac811ae5954f771794165225b0726f /net/dccp/proto.c | |
parent | 531669a0a9041d60d13920973ef8aa4f743c14a0 (diff) | |
download | blackbird-op-linux-725ba8eee3881e619c8e5a0116f1bdb6480ac2d9.tar.gz blackbird-op-linux-725ba8eee3881e619c8e5a0116f1bdb6480ac2d9.zip |
[DCCP]: Introduce the DCCP Kernel hacking menu
Only available if CONFIG_DEBUG_KERNEL is enabled in the "Kernel
Hacking" Menu.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index ed0bf58c8ae0..be0669242069 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -503,12 +503,16 @@ static int __init dccp_ctl_sock_init(void) return rc; } -static void __exit dccp_ctl_sock_exit(void) +#ifdef CONFIG_IP_DCCP_UNLOAD_HACK +void dccp_ctl_sock_exit(void) { if (dccp_ctl_socket != NULL) sock_release(dccp_ctl_socket); } +EXPORT_SYMBOL_GPL(dccp_ctl_sock_exit); +#endif + static int __init init_dccp_v4_mibs(void) { int rc = -ENOMEM; @@ -655,19 +659,21 @@ static const char dccp_del_proto_err_msg[] __exitdata = static void __exit dccp_fini(void) { - dccp_ctl_sock_exit(); - inet_unregister_protosw(&dccp_v4_protosw); if (inet_del_protocol(&dccp_protocol, IPPROTO_DCCP) < 0) printk(dccp_del_proto_err_msg); - /* Free the control endpoint. */ - sock_release(dccp_ctl_socket); - - proto_unregister(&dccp_v4_prot); - + free_percpu(dccp_statistics[0]); + free_percpu(dccp_statistics[1]); + free_pages((unsigned long)dccp_hashinfo.bhash, + get_order(dccp_hashinfo.bhash_size * + sizeof(struct inet_bind_hashbucket))); + free_pages((unsigned long)dccp_hashinfo.ehash, + get_order(dccp_hashinfo.ehash_size * + sizeof(struct inet_ehash_bucket))); kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); + proto_unregister(&dccp_v4_prot); } module_init(dccp_init); |