From: Andi Kleen Date: Tue, 13 Dec 2005 06:17:12 +0000 (-0800) Subject: [PATCH] x86_64: Fix 32bit thread coredumps X-Git-Tag: v2.6.15-rc6~88 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=df818a52fb5e64c72b21029fb9ba80583106932c;p=linux-2.6-omap-h63xx.git [PATCH] x86_64: Fix 32bit thread coredumps When a register set is passed in don't try to fix up the pointer. Noticed by Al Viro Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 830feb272ec..2b760d0d9ce 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -217,8 +217,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr if (!tsk_used_math(tsk)) return 0; if (!regs) - regs = (struct pt_regs *)tsk->thread.rsp0; - --regs; + regs = ((struct pt_regs *)tsk->thread.rsp0) - 1; if (tsk == current) unlazy_fpu(tsk); set_fs(KERNEL_DS);