From: tip-bot for Dan Carpenter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: oleg@redhat.com, tglx@linutronix.de, luto@amacapital.net,
dan.carpenter@oracle.com, dave.hansen@linux.intel.com,
mingo@kernel.org, hpa@zytor.com, masami.hiramatsu.pt@hitachi.com,
linux-kernel@vger.kernel.org
Subject: [tip:x86/mpx] x86_64/traps: Fix always true condition
Date: Tue, 9 Dec 2014 02:18:51 -0800 [thread overview]
Message-ID: <tip-e10abb2f770eeb673d23c19980216b0fb62b4f50@git.kernel.org> (raw)
In-Reply-To: <20141125172114.GA24535@mwanda>
Commit-ID: e10abb2f770eeb673d23c19980216b0fb62b4f50
Gitweb: http://git.kernel.org/tip/e10abb2f770eeb673d23c19980216b0fb62b4f50
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Tue, 25 Nov 2014 20:21:14 +0300
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 8 Dec 2014 12:06:59 +0100
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 <dan.carpenter@oracle.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Link: http://lkml.kernel.org/r/20141125172114.GA24535@mwanda
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 651d5d4..f73fc4a 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.
prev parent reply other threads:[~2014-12-09 10:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 17:21 [patch v2] x86_64, traps: always true condition Dan Carpenter
2014-12-04 21:33 ` Dave Hansen
2014-12-04 21:56 ` Dave Hansen
2014-12-09 10:18 ` tip-bot for Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e10abb2f770eeb673d23c19980216b0fb62b4f50@git.kernel.org \
--to=tipbot@zytor.com \
--cc=dan.carpenter@oracle.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.