On Tue, 2010-04-06 at 13:45 +0300, Dan Carpenter wrote: > copy_to_user() returns the number of bytes left to be copied. > > This was a typo from: d82ef020cf31504c816803b1def94eb5ff173363 > "proc: pagemap: Hold mmap_sem during page walk". > > Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 0962739..bfb2773 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -799,7 +799,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, > start_vaddr = end; > > len = min(count, PM_ENTRY_BYTES * pm.pos); > - if (copy_to_user(buf, pm.buffer, len) < 0) { > + if (copy_to_user(buf, pm.buffer, len)) { > ret = -EFAULT; > goto out_free; > } Acked-by: Matt Mackall <mpm@xxxxxxxxxxx> Linus, please take this one too. -- http://selenic.com : development and support for Mercurial and Linux -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html