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 <jsl...@suse.cz>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: x...@kernel.org
Cc: Josh Poimboeuf <jpoim...@redhat.com>
---
 arch/x86/kernel/stacktrace.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index 093f2ea5dd56..8948b7d9c064 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;
                }
 
-- 
2.16.3

Reply via email to