]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86_64: Fix 32bit thread coredumps
authorAndi Kleen <ak@suse.de>
Tue, 13 Dec 2005 06:17:12 +0000 (22:17 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Dec 2005 06:31:16 +0000 (22:31 -0800)
When a register set is passed in don't try to fix up the pointer.

Noticed by Al Viro

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/ia32/ia32_binfmt.c

index 830feb272eca434c10f73adcb1499abeb71d7f9a..2b760d0d9ce292a515af2977f5423d8f26b75069 100644 (file)
@@ -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);