x86/stacktrace: Do not unwind after user regs
Josh pointed out, that there is no way a frame can be after user regs. So remove the last unwind and the check. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/lkml/20180518064713.26440-1-jslaby@suse.cz Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
1966c5e5bd
commit
0797a8d0d7
@ -113,15 +113,6 @@ __save_stack_trace_reliable(struct stack_trace *trace,
|
||||
if (!user_mode(regs))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* The last frame contains the user mode syscall
|
||||
* pt_regs. Skip it and finish the unwind.
|
||||
*/
|
||||
unwind_next_frame(&state);
|
||||
if (!unwind_done(&state)) {
|
||||
STACKTRACE_DUMP_ONCE(task);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user