diff options
| author | Tiwei Bie <tiwei.btw@antgroup.com> | 2024-11-06 18:39:33 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-14 19:44:40 +0100 |
| commit | 9e497ef3a6cfa1b211626b24312b440339509893 (patch) | |
| tree | b0b08ddecb73d1c19815f183188066fa3c9b9574 /arch/um/kernel | |
| parent | 115e3e51b14a2637058d1bc95b68710f9dc709fd (diff) | |
| download | linux-9e497ef3a6cfa1b211626b24312b440339509893.tar.gz linux-9e497ef3a6cfa1b211626b24312b440339509893.tar.bz2 linux-9e497ef3a6cfa1b211626b24312b440339509893.zip | |
um: Always dump trace for specified task in show_stack
[ Upstream commit 0f659ff362eac69777c4c191b7e5ccb19d76c67d ]
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: 970e51feaddb ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/um/kernel')
| -rw-r--r-- | arch/um/kernel/sysrq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 47f20304af26..c4667a94eefa 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c @@ -52,7 +52,7 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *stack, } printk("%sCall Trace:\n", loglvl); - dump_trace(current, &stackops, (void *)loglvl); + dump_trace(task ?: current, &stackops, (void *)loglvl); } void show_stack(struct task_struct *task, unsigned long *stack) |
