[patch v2] x86_64, traps: always true condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
v2: Use correct fixes tag.

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 67d817e..f176d96 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -331,7 +331,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 kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux