Skip to content

Commit 32163f4

Browse files
Al Virotorvalds
authored andcommitted
alpha: fix usp value in multithreaded coredumps
rdusp() gives us the right value only for the current thread... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 77edffb commit 32163f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/alpha/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti)
356356
dest[27] = pt->r27;
357357
dest[28] = pt->r28;
358358
dest[29] = pt->gp;
359-
dest[30] = rdusp();
359+
dest[30] = ti == current_thread_info() ? rdusp() : ti->pcb.usp;
360360
dest[31] = pt->pc;
361361

362362
/* Once upon a time this was the PS value. Which is stupid

0 commit comments

Comments
 (0)