aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2014-11-25 20:21:14 +0300
committerIngo Molnar <[email protected]>2014-12-08 12:06:59 +0100
commite10abb2f770eeb673d23c19980216b0fb62b4f50 (patch)
tree1da309be91d2b4cb21a6590e49778f78ebe5e8b5
parent9f7789f845cc100dd0d94fa1aa083e3373dc03db (diff)
x86_64/traps: Fix always true condition
We should be checking IS_ERR() here. PTR_ERR() is always true. Fixes: fe3d197f8431 ('x86, mpx: On-demand kernel allocation of bounds tables') Signed-off-by: Dan Carpenter <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dave Hansen <[email protected]> Link: http://lkml.kernel.org/r/20141125172114.GA24535@mwanda Signed-off-by: Ingo Molnar <[email protected]>
-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 651d5d4f7558..f73fc4a22a4d 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -323,7 +323,7 @@ dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
break; /* Success, it was handled */
case 1: /* Bound violation. */
info = mpx_generate_siginfo(regs, xsave_buf);
- if (PTR_ERR(info)) {
+ if (IS_ERR(info)) {
/*
* We failed to decode the MPX instruction. Act as if
* the exception was not caused by MPX.