diff options
Diffstat (limited to 'arch/x86_64/ia32/ia32_binfmt.c')
-rw-r--r-- | arch/x86_64/ia32/ia32_binfmt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 2b760d0d9ce..029bddab045 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -197,8 +197,7 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re | |||
197 | 197 | ||
198 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 198 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) |
199 | { | 199 | { |
200 | struct pt_regs *pp = (struct pt_regs *)(t->thread.rsp0); | 200 | struct pt_regs *pp = task_pt_regs(t); |
201 | --pp; | ||
202 | ELF_CORE_COPY_REGS((*elfregs), pp); | 201 | ELF_CORE_COPY_REGS((*elfregs), pp); |
203 | /* fix wrong segments */ | 202 | /* fix wrong segments */ |
204 | (*elfregs)[7] = t->thread.ds; | 203 | (*elfregs)[7] = t->thread.ds; |
@@ -217,7 +216,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr | |||
217 | if (!tsk_used_math(tsk)) | 216 | if (!tsk_used_math(tsk)) |
218 | return 0; | 217 | return 0; |
219 | if (!regs) | 218 | if (!regs) |
220 | regs = ((struct pt_regs *)tsk->thread.rsp0) - 1; | 219 | regs = task_pt_regs(tsk); |
221 | if (tsk == current) | 220 | if (tsk == current) |
222 | unlazy_fpu(tsk); | 221 | unlazy_fpu(tsk); |
223 | set_fs(KERNEL_DS); | 222 | set_fs(KERNEL_DS); |
@@ -233,7 +232,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr | |||
233 | static inline int | 232 | static inline int |
234 | elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) | 233 | elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) |
235 | { | 234 | { |
236 | struct pt_regs *regs = ((struct pt_regs *)(t->thread.rsp0))-1; | 235 | struct pt_regs *regs = task_pt_regs(t); |
237 | if (!tsk_used_math(t)) | 236 | if (!tsk_used_math(t)) |
238 | return 0; | 237 | return 0; |
239 | if (t == current) | 238 | if (t == current) |