diff options
author | Olof Johansson <olof@lixom.net> | 2018-09-25 11:30:47 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2018-09-25 11:30:47 -0700 |
commit | cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1 (patch) | |
tree | 2628d4922d0675df5659439f22f5ebda9c4b302a /arch/x86/lib/usercopy.c | |
parent | bf1da406909b13903873d1f91346f99303fd8cb3 (diff) | |
parent | 11da3a7f84f19c26da6f86af878298694ede0804 (diff) |
Merge tag 'v4.19-rc3' into next/drivers
Linux 4.19-rc3
Diffstat (limited to 'arch/x86/lib/usercopy.c')
-rw-r--r-- | arch/x86/lib/usercopy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/lib/usercopy.c b/arch/x86/lib/usercopy.c index c8c6ad0d58b8..3f435d7fca5e 100644 --- a/arch/x86/lib/usercopy.c +++ b/arch/x86/lib/usercopy.c @@ -7,6 +7,8 @@ #include <linux/uaccess.h> #include <linux/export.h> +#include <asm/tlbflush.h> + /* * We rely on the nested NMI work to allow atomic faults from the NMI path; the * nested NMI paths are careful to preserve CR2. @@ -19,6 +21,9 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n) if (__range_not_ok(from, n, TASK_SIZE)) return n; + if (!nmi_uaccess_okay()) + return n; + /* * Even though this function is typically called from NMI/IRQ context * disable pagefaults so that its behaviour is consistent even when |