Skip to content

Commit

Permalink
[PATCH] x86_64: Fix 32bit thread coredumps
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Dec 13, 2005
1 parent d6ece54 commit df818a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86_64/ia32/ia32_binfmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit df818a5

Please sign in to comment.