diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-06-25 08:27:58 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-06-25 08:33:46 -0400 |
commit | aa715284b4d28cabde6c25c568d769a6be712bc8 (patch) | |
tree | c308ab1cdf8d0d7b6b1a01a1a233183670d62f9f /kernel/futex.c | |
parent | 28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff) |
futex: request only one page from get_user_pages()
Yanmin noticed that fault_in_user_writeable() requests 4 pages instead
of one.
That's the result of blindly trusting Linus' proposal :) I even looked
up the prototype to verify the correctness: the argument in question
is confusingly enough named "len" while in reality it means number of
pages.
Pointed-out-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 1c337112335c..794c862125fe 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -299,7 +299,7 @@ void put_futex_key(int fshared, union futex_key *key) | |||
299 | static int fault_in_user_writeable(u32 __user *uaddr) | 299 | static int fault_in_user_writeable(u32 __user *uaddr) |
300 | { | 300 | { |
301 | int ret = get_user_pages(current, current->mm, (unsigned long)uaddr, | 301 | int ret = get_user_pages(current, current->mm, (unsigned long)uaddr, |
302 | sizeof(*uaddr), 1, 0, NULL, NULL); | 302 | 1, 1, 0, NULL, NULL); |
303 | return ret < 0 ? ret : 0; | 303 | return ret < 0 ? ret : 0; |
304 | } | 304 | } |
305 | 305 | ||