From: Dan Carpenter <error27@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Matt Mackall <mpm@selenic.com>,
David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] proc: copy_to_user() returns unsigned
Date: Tue, 06 Apr 2010 10:45:39 +0000 [thread overview]
Message-ID: <20100406104539.GC21229@bicker> (raw)
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;
}
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Matt Mackall <mpm@selenic.com>,
David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] proc: copy_to_user() returns unsigned
Date: Tue, 6 Apr 2010 13:45:39 +0300 [thread overview]
Message-ID: <20100406104539.GC21229@bicker> (raw)
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;
}
next reply other threads:[~2010-04-06 10:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 10:45 Dan Carpenter [this message]
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:04 ` Minchan Kim
2010-04-06 11:32 ` KOSAKI Motohiro
2010-04-06 11:32 ` KOSAKI Motohiro
2010-04-06 15:17 ` Matt Mackall
2010-04-06 15:17 ` Matt Mackall
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=20100406104539.GC21229@bicker \
--to=error27@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan.kim@gmail.com \
--cc=mpm@selenic.com \
--cc=rientjes@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.