summaryrefslogtreecommitdiffstats
path: root/net/dccp/proto.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-14 01:35:39 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-30 00:59:43 +0200
commit725ba8eee3881e619c8e5a0116f1bdb6480ac2d9 (patch)
treee4d92f0fcbac811ae5954f771794165225b0726f /net/dccp/proto.c
parent[DCCP]: Rewrite dccp_sendmsg to be more like UDP (diff)
downloadlinux-725ba8eee3881e619c8e5a0116f1bdb6480ac2d9.tar.xz
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 '')
-rw-r--r--net/dccp/proto.c22
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);