From: Stas Sergeev Date: Sun, 1 Jan 2006 01:18:52 +0000 (+0300) Subject: [PATCH] x86: teach dump_task_regs() about the -8 offset. X-Git-Tag: v2.6.15~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=557962a926c62a9c4bd79d6b36df873d4f8c51ef;p=linux-2.6 [PATCH] x86: teach dump_task_regs() about the -8 offset. This should fix multi-threaded core-files Signed-off-by: stsp@aknet.ru Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index df6c2bcde0..2333aead05 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -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;