From: Matt Mackall <mpm@selenic.com>
To: Dan Carpenter <error27@gmail.com>,
Linus Torvalds <torvalds@linuxfoundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] proc: copy_to_user() returns unsigned
Date: Tue, 06 Apr 2010 10:17:56 -0500 [thread overview]
Message-ID: <1270567076.3552.2016.camel@calx> (raw)
In-Reply-To: <20100406104539.GC21229@bicker>
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@gmail.com>
>
> 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@selenic.com>
Linus, please take this one too.
--
http://selenic.com : development and support for Mercurial and Linux
prev parent reply other threads:[~2010-04-06 15:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 10:45 [patch] proc: copy_to_user() returns unsigned Dan Carpenter
2010-04-06 11:04 ` Minchan Kim
2010-04-06 11:32 ` KOSAKI Motohiro
2010-04-06 15:17 ` Matt Mackall [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1270567076.3552.2016.camel@calx \
--to=mpm@selenic.com \
--cc=akpm@linux-foundation.org \
--cc=error27@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan.kim@gmail.com \
--cc=rientjes@google.com \
--cc=torvalds@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox