X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fdccp%2Fprobe.c;h=81368a7f5379c9907b88e64ac03fa5f23b7313f6;hb=5b664cb235e97afbf34db9c4d77f08ebd725335e;hp=6e1df62bd7c9167dc6e123b20c5af79ce30537c3;hpb=5f3b28781cbc030351e2fa0712602afbea592aae;p=linux-2.6 diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 6e1df62bd7..81368a7f53 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c @@ -42,7 +42,7 @@ static int bufsize = 64 * 1024; static const char procname[] = "dccpprobe"; -struct { +static struct { struct kfifo *fifo; spinlock_t lock; wait_queue_head_t wait; @@ -140,7 +140,7 @@ static ssize_t dccpprobe_read(struct file *file, char __user *buf, goto out_free; cnt = kfifo_get(dccpw.fifo, tbuf, len); - error = copy_to_user(buf, tbuf, cnt); + error = copy_to_user(buf, tbuf, cnt) ? -EFAULT : 0; out_free: vfree(tbuf);