aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/probe.c')
-rw-r--r--net/dccp/probe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index bae10b0f2fc3..7053bb827bc8 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -30,6 +30,7 @@
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/kfifo.h> 31#include <linux/kfifo.h>
32#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
33#include <net/net_namespace.h>
33 34
34#include "dccp.h" 35#include "dccp.h"
35#include "ccid.h" 36#include "ccid.h"
@@ -168,7 +169,7 @@ static __init int dccpprobe_init(void)
168 if (IS_ERR(dccpw.fifo)) 169 if (IS_ERR(dccpw.fifo))
169 return PTR_ERR(dccpw.fifo); 170 return PTR_ERR(dccpw.fifo);
170 171
171 if (!proc_net_fops_create(procname, S_IRUSR, &dccpprobe_fops)) 172 if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops))
172 goto err0; 173 goto err0;
173 174
174 ret = register_jprobe(&dccp_send_probe); 175 ret = register_jprobe(&dccp_send_probe);
@@ -178,7 +179,7 @@ static __init int dccpprobe_init(void)
178 pr_info("DCCP watch registered (port=%d)\n", port); 179 pr_info("DCCP watch registered (port=%d)\n", port);
179 return 0; 180 return 0;
180err1: 181err1:
181 proc_net_remove(procname); 182 proc_net_remove(&init_net, procname);
182err0: 183err0:
183 kfifo_free(dccpw.fifo); 184 kfifo_free(dccpw.fifo);
184 return ret; 185 return ret;
@@ -188,7 +189,7 @@ module_init(dccpprobe_init);
188static __exit void dccpprobe_exit(void) 189static __exit void dccpprobe_exit(void)
189{ 190{
190 kfifo_free(dccpw.fifo); 191 kfifo_free(dccpw.fifo);
191 proc_net_remove(procname); 192 proc_net_remove(&init_net, procname);
192 unregister_jprobe(&dccp_send_probe); 193 unregister_jprobe(&dccp_send_probe);
193 194
194} 195}