]> err.no Git - linux-2.6/blobdiff - net/dccp/probe.c
Merge commit 'v2.6.26-rc8' into x86/mce
[linux-2.6] / net / dccp / probe.c
index 6e1df62bd7c9167dc6e123b20c5af79ce30537c3..81368a7f5379c9907b88e64ac03fa5f23b7313f6 100644 (file)
@@ -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);