summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@amacapital.net>2015-03-09 17:42:31 -0700
committerBen Hutchings <ben@decadent.org.uk>2015-05-09 23:16:27 +0100
commit51a8c6da7ebae55e0ece79481e3fd3c472b97b26 (patch)
treefebfb4958eae6229249103691bdd6dd4716247cd /arch
parent826ba3143f8ddc543c32f0f496543eea3720dcb9 (diff)
downloadlinux-stable-51a8c6da7ebae55e0ece79481e3fd3c472b97b26.tar.gz
linux-stable-51a8c6da7ebae55e0ece79481e3fd3c472b97b26.tar.bz2
linux-stable-51a8c6da7ebae55e0ece79481e3fd3c472b97b26.zip
x86/asm/entry/32: Fix user_mode() misuses
commit 394838c96013ba414a24ffe7a2a593a9154daadf upstream. The one in do_debug() is probably harmless, but better safe than sorry. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/d67deaa9df5458363623001f252d1aee3215d014.1425948056.git.luto@amacapital.net Signed-off-by: Ingo Molnar <mingo@kernel.org> [bwh: Backported to 3.2: drop the do_bounds() part] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 2aff3471aa4e..edbd30a152c1 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -435,7 +435,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
* then it's very likely the result of an icebp/int01 trap.
* User wants a sigtrap for that.
*/
- if (!dr6 && user_mode(regs))
+ if (!dr6 && user_mode_vm(regs))
user_icebp = 1;
/* Catch kmemcheck conditions first of all! */