Skip to content

Commit 0f659ff

Browse files
btw616jmberg-intel
authored andcommitted
um: Always dump trace for specified task in show_stack
Currently, show_stack() always dumps the trace of the current task. However, it should dump the trace of the specified task if one is provided. Otherwise, things like running "echo t > sysrq-trigger" won't work as expected. Fixes: 970e51f ("um: Add support for CONFIG_STACKTRACE") Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241106103933.1132365-1-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 51b39d7 commit 0f659ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/um/kernel/sysrq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ void show_stack(struct task_struct *task, unsigned long *stack,
4646
}
4747

4848
printk("%sCall Trace:\n", loglvl);
49-
dump_trace(current, &stackops, (void *)loglvl);
49+
dump_trace(task ?: current, &stackops, (void *)loglvl);
5050
}

0 commit comments

Comments
 (0)