]> git.baikalelectronics.ru Git - kernel.git/commit
stacktrace: Don't skip first entry on noncurrent tasks
authorJiri Slaby <jslaby@suse.cz>
Wed, 30 Oct 2019 07:25:45 +0000 (08:25 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 4 Nov 2019 20:19:25 +0000 (21:19 +0100)
commite4a5383a52d0dccb6bc0691969a1dea5fa0eb876
tree91ad1228a374988275c24f2c3f31063a1faa6610
parent0af0731bd6559a20fbe86f8f0f8e49c6cf00fd42
stacktrace: Don't skip first entry on noncurrent tasks

When doing cat /proc/<PID>/stack, the output is missing the first entry.
When the current code walks the stack starting in stack_trace_save_tsk,
it skips all scheduler functions (that's OK) plus one more function. But
this one function should be skipped only for the 'current' task as it is
stack_trace_save_tsk proper.

The original code (before the common infrastructure) skipped one
function only for the 'current' task -- see save_stack_trace_tsk before
734f380a9958. So do so also in the new infrastructure now.

Fixes: ed11d5c49f12 ("stacktrace: Provide common infrastructure")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20191030072545.19462-1-jslaby@suse.cz
kernel/stacktrace.c