diff options
| author | 2012-06-20 14:22:32 +0200 | |
|---|---|---|
| committer | 2012-06-20 14:22:34 +0200 | |
| commit | 6a991acceedce3ca93caef8ba7af2468c9451614 (patch) | |
| tree | 1997d71fc57bdebd12fc70a73070281614b52f15 /arch/x86/lib/usercopy.c | |
| parent | x86: Save cr2 in NMI in case NMIs take a page fault (for i386) (diff) | |
| parent | Linux 3.5-rc3 (diff) | |
| download | linux-dev-6a991acceedce3ca93caef8ba7af2468c9451614.tar.xz linux-dev-6a991acceedce3ca93caef8ba7af2468c9451614.zip | |
Merge commit 'v3.5-rc3' into x86/debug
Merge it in to pick up a fix that we are going to clean up in this
branch.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/lib/usercopy.c')
| -rw-r--r-- | arch/x86/lib/usercopy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/lib/usercopy.c b/arch/x86/lib/usercopy.c index f61ee67ec00f..4f74d94c8d97 100644 --- a/arch/x86/lib/usercopy.c +++ b/arch/x86/lib/usercopy.c @@ -8,6 +8,7 @@ #include <linux/module.h> #include <asm/word-at-a-time.h> +#include <linux/sched.h> /* * best effort, GUP based copy_from_user() that is NMI-safe @@ -21,6 +22,9 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n) void *map; int ret; + if (__range_not_ok(from, n, TASK_SIZE)) + return len; + do { ret = __get_user_pages_fast(addr, 1, 0, &page); if (!ret) |
