Date: Sun, 28 Nov 2010 17:56:34 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r216012 - in head/sys: amd64/amd64 i386/i386 Message-ID: <201011281756.oASHuYdQ035497@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Nov 28 17:56:34 2010 New Revision: 216012 URL: http://svn.freebsd.org/changeset/base/216012 Log: Calling fill_fpregs() for curthread is legitimate, and ELF coredump does this. Reported and tested by: pho MFC after: 5 days Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Nov 28 17:23:28 2010 (r216011) +++ head/sys/amd64/amd64/machdep.c Sun Nov 28 17:56:34 2010 (r216012) @@ -1975,7 +1975,8 @@ int fill_fpregs(struct thread *td, struct fpreg *fpregs) { - KASSERT(TD_IS_SUSPENDED(td), ("not suspended thread %p", td)); + KASSERT(td == curthread || TD_IS_SUSPENDED(td), + ("not suspended thread %p", td)); fpugetregs(td); fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs); return (0); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Nov 28 17:23:28 2010 (r216011) +++ head/sys/i386/i386/machdep.c Sun Nov 28 17:56:34 2010 (r216012) @@ -3203,7 +3203,8 @@ int fill_fpregs(struct thread *td, struct fpreg *fpregs) { - KASSERT(TD_IS_SUSPENDED(td), ("not suspended thread %p", td)); + KASSERT(td == curthread || TD_IS_SUSPENDED(td), + ("not suspended thread %p", td)); npxgetregs(td); #ifdef CPU_ENABLE_SSE if (cpu_fxsr)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011281756.oASHuYdQ035497>