]> err.no Git - linux-2.6/blobdiff - kernel/cpuset.c
Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6-git-rfc3542
[linux-2.6] / kernel / cpuset.c
index 1f06e76901067ffa1c08d586d0128f64ad6d6c65..712d02029971ed456a4025d23f0cd4d187d2f6ff 100644 (file)
@@ -972,6 +972,10 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf,
        *s++ = '\n';
        *s = '\0';
 
+       /* Do nothing if *ppos is at the eof or beyond the eof. */
+       if (s - page <= *ppos)
+               return 0;
+
        start = page + *ppos;
        n = s - start;
        retval = n - copy_to_user(buf, start, min(n, nbytes));