Index: linux-2.6.18/kernel/cpuset.c =================================================================== --- linux-2.6.18.orig/kernel/cpuset.c +++ linux-2.6.18/kernel/cpuset.c @@ -1743,12 +1743,7 @@ static ssize_t cpuset_tasks_read(struct { struct ctr_struct *ctr = file->private_data; - if (*ppos + nbytes > ctr->bufsz) - nbytes = ctr->bufsz - *ppos; - if (copy_to_user(buf, ctr->buf + *ppos, nbytes)) - return -EFAULT; - *ppos += nbytes; - return nbytes; + return simple_read_from_buffer(buf, nbytes, ppos, ctr->buf, ctr->bufsz); } static int cpuset_tasks_release(struct inode *unused_inode, struct file *file)