Re: [PATCH v2] stacktrace: don't skip first entry on noncurrent tasks

From: Jiri Slaby
Date: Wed Oct 30 2019 - 02:09:28 EST


On 29. 10. 19, 8:19, Jiri Slaby wrote:
> --- a/kernel/stacktrace.c
> +++ b/kernel/stacktrace.c
> @@ -298,7 +299,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,

Argh, "task" here and:

> struct stack_trace trace = {
> .entries = store,
> .max_entries = size,
> - .skip = skipnr + 1,
> + /* skip this function if they are tracing us */
> + .skip = skipnr + !!(current == tsk),

"tsk" here. Scratch this one.

thanks,
--
js
suse labs