Skip to content

Commit b72cc2e

Browse files
chleroympe
authored andcommitted
powerpc: Use task_stack_page() in current_pt_regs()
Change current_pt_regs() to use task_stack_page() rather than current_thread_info() so that it keeps working once we enable THREAD_INFO_IN_TASK. Signed-off-by: Christophe Leroy <[email protected]> [mpe: Split out of large patch] Signed-off-by: Michael Ellerman <[email protected]>
1 parent 3733304 commit b72cc2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/include/asm/ptrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ extern int ptrace_put_reg(struct task_struct *task, int regno,
157157
unsigned long data);
158158

159159
#define current_pt_regs() \
160-
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
160+
((struct pt_regs *)((unsigned long)task_stack_page(current) + THREAD_SIZE) - 1)
161161
/*
162162
* We use the least-significant bit of the trap field to indicate
163163
* whether we have saved the full set of registers, or only a

0 commit comments

Comments
 (0)