diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-13 19:35:39 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:59:43 -0400 |
commit | 725ba8eee3881e619c8e5a0116f1bdb6480ac2d9 (patch) | |
tree | e4d92f0fcbac811ae5954f771794165225b0726f /net/dccp/proto.c | |
parent | 531669a0a9041d60d13920973ef8aa4f743c14a0 (diff) |
[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) | |||
503 | return rc; | 503 | return rc; |
504 | } | 504 | } |
505 | 505 | ||
506 | static void __exit dccp_ctl_sock_exit(void) | 506 | #ifdef CONFIG_IP_DCCP_UNLOAD_HACK |
507 | void dccp_ctl_sock_exit(void) | ||
507 | { | 508 | { |
508 | if (dccp_ctl_socket != NULL) | 509 | if (dccp_ctl_socket != NULL) |
509 | sock_release(dccp_ctl_socket); | 510 | sock_release(dccp_ctl_socket); |
510 | } | 511 | } |
511 | 512 | ||
513 | EXPORT_SYMBOL_GPL(dccp_ctl_sock_exit); | ||
514 | #endif | ||
515 | |||
512 | static int __init init_dccp_v4_mibs(void) | 516 | static int __init init_dccp_v4_mibs(void) |
513 | { | 517 | { |
514 | int rc = -ENOMEM; | 518 | int rc = -ENOMEM; |
@@ -655,19 +659,21 @@ static const char dccp_del_proto_err_msg[] __exitdata = | |||
655 | 659 | ||
656 | static void __exit dccp_fini(void) | 660 | static void __exit dccp_fini(void) |
657 | { | 661 | { |
658 | dccp_ctl_sock_exit(); | ||
659 | |||
660 | inet_unregister_protosw(&dccp_v4_protosw); | 662 | inet_unregister_protosw(&dccp_v4_protosw); |
661 | 663 | ||
662 | if (inet_del_protocol(&dccp_protocol, IPPROTO_DCCP) < 0) | 664 | if (inet_del_protocol(&dccp_protocol, IPPROTO_DCCP) < 0) |
663 | printk(dccp_del_proto_err_msg); | 665 | printk(dccp_del_proto_err_msg); |
664 | 666 | ||
665 | /* Free the control endpoint. */ | 667 | free_percpu(dccp_statistics[0]); |
666 | sock_release(dccp_ctl_socket); | 668 | free_percpu(dccp_statistics[1]); |
667 | 669 | free_pages((unsigned long)dccp_hashinfo.bhash, | |
668 | proto_unregister(&dccp_v4_prot); | 670 | get_order(dccp_hashinfo.bhash_size * |
669 | 671 | sizeof(struct inet_bind_hashbucket))); | |
672 | free_pages((unsigned long)dccp_hashinfo.ehash, | ||
673 | get_order(dccp_hashinfo.ehash_size * | ||
674 | sizeof(struct inet_ehash_bucket))); | ||
670 | kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); | 675 | kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); |
676 | proto_unregister(&dccp_v4_prot); | ||
671 | } | 677 | } |
672 | 678 | ||
673 | module_init(dccp_init); | 679 | module_init(dccp_init); |