X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fdccp%2Fprobe.c;h=7053bb827bc88c34ca6a47bdcf9644425bc74c25;hb=ad1b30b1c282bc8c726a9b123a1312a3930bcd42;hp=1f5e3ba62065e76bf8c48b39b7a7a6a174800919;hpb=48a7afe314bfc4d7f50e1608632f503dbba7e013;p=linux-2.6-omap-h63xx.git diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 1f5e3ba6206..7053bb827bc 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "dccp.h" #include "ccid.h" @@ -112,7 +113,7 @@ static struct jprobe dccp_send_probe = { .kp = { .symbol_name = "dccp_sendmsg", }, - .entry = JPROBE_ENTRY(jdccp_sendmsg), + .entry = jdccp_sendmsg, }; static int dccpprobe_open(struct inode *inode, struct file *file) @@ -128,7 +129,7 @@ static ssize_t dccpprobe_read(struct file *file, char __user *buf, int error = 0, cnt = 0; unsigned char *tbuf; - if (!buf || len < 0) + if (!buf) return -EINVAL; if (len == 0) @@ -168,7 +169,7 @@ static __init int dccpprobe_init(void) if (IS_ERR(dccpw.fifo)) return PTR_ERR(dccpw.fifo); - if (!proc_net_fops_create(procname, S_IRUSR, &dccpprobe_fops)) + if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) goto err0; ret = register_jprobe(&dccp_send_probe); @@ -178,7 +179,7 @@ static __init int dccpprobe_init(void) pr_info("DCCP watch registered (port=%d)\n", port); return 0; err1: - proc_net_remove(procname); + proc_net_remove(&init_net, procname); err0: kfifo_free(dccpw.fifo); return ret; @@ -188,7 +189,7 @@ module_init(dccpprobe_init); static __exit void dccpprobe_exit(void) { kfifo_free(dccpw.fifo); - proc_net_remove(procname); + proc_net_remove(&init_net, procname); unregister_jprobe(&dccp_send_probe); }