x86_64, traps: always true condition
Subsystems (2)
PATCH 1/1 x86_64, traps: always true condition
We should be checking IS_ERR() here. PTR_ERR() is always true.
Fixes b645af2d5905 ('x86_64, traps: Rework bad_iret')
Signed-off-by Dan Carpenter <[email protected]>
arch/x86/kernel/traps.c +1 -1
@@ -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.
Quoted 10 lines · Andy Lutomirski
Quoted 4 lines · Dan Carpenter
We should be checking
IS_ERR()here.PTR_ERR()is always true.Fixes b645af2d5905 ('x86_64, traps: Rework bad_iret')Huh?
I agree with the change, but the Fixes line looks wrong.
Oops. Sorry for that, it was the fe3d197f8431 ('x86, mpx: On-demand kernel allocation of bounds tables') change. I will resend.
regards,
dan carpenter