[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100406202339.7E6F.A69D9226@jp.fujitsu.com>
Date: Tue, 6 Apr 2010 20:32:32 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Dan Carpenter <error27@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Minchan Kim <minchan.kim@...il.com>,
Matt Mackall <mpm@...enic.com>,
David Rientjes <rientjes@...gle.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Cc: kosaki.motohiro@...fujitsu.com
Subject: Re: [patch] proc: copy_to_user() returns unsigned
> 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@...il.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;
> }
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
However I don't think this patch is kernel-janitors material. it should
be just merged mainline soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists