Calling fill_fpregs() for curthread is legitimate, and ELF coredump

does this.

Reported and tested by:	pho
MFC after:	5 days
This commit is contained in:
Konstantin Belousov 2010-11-28 17:56:34 +00:00
parent a0db37b5f6
commit c6fb218c3c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216012
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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)