Skip to content

Commit

Permalink
[PATCH] x86: teach dump_task_regs() about the -8 offset.
Browse files Browse the repository at this point in the history
This should fix multi-threaded core-files

Signed-off-by: stsp@aknet.ru
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Stas Sergeev authored and Linus Torvalds committed Jan 1, 2006
1 parent de9e007 commit 557962a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/i386/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
struct pt_regs ptregs;

ptregs = *(struct pt_regs *)
((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs));
((unsigned long)tsk->thread_info +
/* see comments in copy_thread() about -8 */
THREAD_SIZE - sizeof(ptregs) - 8);
ptregs.xcs &= 0xffff;
ptregs.xds &= 0xffff;
ptregs.xes &= 0xffff;
Expand Down

0 comments on commit 557962a

Please sign in to comment.