[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <157338131323.14789.2179255265964358886.tglx@nanos.tec.linutronix.de>
Date: Sun, 10 Nov 2019 10:21:53 -0000
From: Thomas Gleixner <tglx@...utronix.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [GIT pull] core/urgent for v5.4-rc7
Linus,
please pull the latest core-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-for-linus
up to: b0c51f158455: stacktrace: Don't skip first entry on noncurrent tasks
A small fix for a stacktrace regression. Saving a stacktrace for a foreign
task skipped an extra entry which makes e.g. the output of /proc/$PID/stack
incomplete.
Thanks,
tglx
------------------>
Jiri Slaby (1):
stacktrace: Don't skip first entry on noncurrent tasks
kernel/stacktrace.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index 6d1f68b7e528..c9ea7eb2cb1a 100644
--- a/kernel/stacktrace.c
+++ b/kernel/stacktrace.c
@@ -141,7 +141,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *tsk, unsigned long *store,
struct stacktrace_cookie c = {
.store = store,
.size = size,
- .skip = skipnr + 1,
+ /* skip this function if they are tracing us */
+ .skip = skipnr + !!(current == tsk),
};
if (!try_get_task_stack(tsk))
@@ -298,7 +299,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,
struct stack_trace trace = {
.entries = store,
.max_entries = size,
- .skip = skipnr + 1,
+ /* skip this function if they are tracing us */
+ .skip = skipnr + !!(current == task),
};
save_stack_trace_tsk(task, &trace);
Powered by blists - more mailing lists