Commit 95455307 authored by Dave Hansen's avatar Dave Hansen Committed by Greg Kroah-Hartman

x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal

[ Upstream commit a50093d6 ]

There is some noisy debug code at the end of the signal handler.  It was
disabled by an early, unconditional "return".  However, that return also
hid a dprint_in_signal=0, which kept dprint_in_signal=1 and effectively
locked us into permanent dprint_in_signal=1 behavior.

Remove the return and the dead code, fixing dprint_in_signal.
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellermen <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20180509171342.846B9B2E@viggo.jf.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b9f3a74
...@@ -325,22 +325,6 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext) ...@@ -325,22 +325,6 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext)
dprintf1("WARNING: set PRKU=0 to allow faulting instruction to continue\n"); dprintf1("WARNING: set PRKU=0 to allow faulting instruction to continue\n");
pkru_faults++; pkru_faults++;
dprintf1("<<<<==================================================\n"); dprintf1("<<<<==================================================\n");
return;
if (trapno == 14) {
fprintf(stderr,
"ERROR: In signal handler, page fault, trapno = %d, ip = %016lx\n",
trapno, ip);
fprintf(stderr, "si_addr %p\n", si->si_addr);
fprintf(stderr, "REG_ERR: %lx\n",
(unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]);
exit(1);
} else {
fprintf(stderr, "unexpected trap %d! at 0x%lx\n", trapno, ip);
fprintf(stderr, "si_addr %p\n", si->si_addr);
fprintf(stderr, "REG_ERR: %lx\n",
(unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]);
exit(2);
}
dprint_in_signal = 0; dprint_in_signal = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment