Skip to content

Commit 5218919

Browse files
liutgnulian-bo
authored andcommitted
s390x: Fix "bt -f/-F" command fail with seek error
Kernel commit ce3dc447493ff ("s390: add support for virtually mapped kernel stacks") renamed "panic_task" to "nodat_stack" in the struct lowcore, which leads a wrong stack base/top calculation. As a result, the "bt -f/-F" may fail with the seek error: crash> bt -f PID: 3359 TASK: 28b01a09400 CPU: 0 COMMAND: "runtest.sh" LOWCORE INFO: ... -general registers: 0x0000000034dd9140 0x0000039600000002 0x00000396cad7dfa0 0x0000028b03ba5000 ... 0000028c6e9fffd8: 0000000000000000 0000000000000000 0000028c6e9fffe8: 0000000000000000 0000000000000000 0000028c6e9ffff8: 0000000000000000bt: seek error: kernel virtual address: 28c6ea00000 type: "readmem_ul" Signed-off-by: Tao Liu <[email protected]>
1 parent 321e1e8 commit 5218919

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

s390x.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,10 @@ static void s390x_back_trace_cmd(struct bt_info *bt)
17971797
cpu, lowcore, &low, &high);
17981798
sp = show_trace(bt, cnt, sp, low, high);
17991799
}
1800-
get_int_stack("panic_stack", cpu, lowcore, &low, &high);
1800+
if (MEMBER_EXISTS("lowcore", "nodat_stack"))
1801+
get_int_stack("nodat_stack", cpu, lowcore, &low, &high);
1802+
else
1803+
get_int_stack("panic_stack", cpu, lowcore, &low, &high);
18011804
sp = show_trace(bt, cnt, sp, low, high);
18021805
get_int_stack("async_stack", cpu, lowcore, &low, &high);
18031806
sp = show_trace(bt, cnt, sp, low, high);

0 commit comments

Comments
 (0)