From: Jiri Slaby Date: Fri, 18 May 2018 06:47:08 +0000 (+0200) Subject: x86/stacktrace: Do not unwind after user regs X-Git-Tag: v5.15~8294^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0797a8d0d79769574550caa5ca5d89c237723250;p=platform%2Fkernel%2Flinux-starfive.git 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 Acked-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/lkml/20180518064713.26440-1-jslaby@suse.cz Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c index 093f2ea..8948b7d 100644 --- a/arch/x86/kernel/stacktrace.c +++ b/arch/x86/kernel/stacktrace.c @@ -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; }