summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarl Mehltretter <kmehltretter@gmail.com>2026-07-23 06:10:55 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2026-08-10 11:47:59 +0200
commit09f71dbeb287e367beea56d9ac8a3d356ef5e02a (patch)
tree6fb0eb966f85ef4615331d0c76bac98bf9024be3 /scripts
parent993e1b93dbf64177551271496d92512a1d2c8643 (diff)
downloadlinux-09f71dbeb287e367beea56d9ac8a3d356ef5e02a.tar.gz
linux-09f71dbeb287e367beea56d9ac8a3d356ef5e02a.zip
m68k: Fix backtraces for non-running tasks
When no stack pointer is supplied, show_stack() starts at thread.esp0. This is the saved userspace register frame, not where a task was switched out. For kernel threads it points to the zeroed frame created by copy_thread(), so sched_show_task() prints no useful backtrace. Use thread.ksp for non-current tasks. It is saved by switch_to() and is already used by __get_wchan(). For current, start at the current stack frame, as is already done when no task is supplied. Tested on qemu-system-m68k -M virt using SysRq-t. All task dumps contained resolved frames. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://patch.msgid.link/20260723041055.47289-1-kmehltretter@gmail.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions