lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 9 Dec 2014 02:18:51 -0800
From:	tip-bot for Dan Carpenter <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	oleg@...hat.com, tglx@...utronix.de, luto@...capital.net,
	dan.carpenter@...cle.com, dave.hansen@...ux.intel.com,
	mingo@...nel.org, hpa@...or.com, masami.hiramatsu.pt@...achi.com,
	linux-kernel@...r.kernel.org
Subject: [tip:x86/mpx] x86_64/traps: Fix always true condition

Commit-ID:  e10abb2f770eeb673d23c19980216b0fb62b4f50
Gitweb:     http://git.kernel.org/tip/e10abb2f770eeb673d23c19980216b0fb62b4f50
Author:     Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Tue, 25 Nov 2014 20:21:14 +0300
Committer:  Ingo Molnar <mingo@...nel.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@...cle.com>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Link: http://lkml.kernel.org/r/20141125172114.GA24535@mwanda
Signed-off-by: Ingo Molnar <mingo@...nel.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ