Date: Wed, 17 Aug 2016 07:09:23 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304262 - in stable/10/sys: amd64/amd64 i386/i386 Message-ID: <201608170709.u7H79N0a000157@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Aug 17 07:09:22 2016 New Revision: 304262 URL: https://svnweb.freebsd.org/changeset/base/304262 Log: MFC r303913: Unconditionally perform checks that FPU region was entered, when #NM exception is caught in kernel mode. Modified: stable/10/sys/amd64/amd64/trap.c stable/10/sys/i386/i386/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Wed Aug 17 07:07:29 2016 (r304261) +++ stable/10/sys/amd64/amd64/trap.c Wed Aug 17 07:09:22 2016 (r304262) @@ -448,8 +448,8 @@ trap(struct trapframe *frame) goto out; case T_DNA: - KASSERT(!PCB_USER_FPU(td->td_pcb), - ("Unregistered use of FPU in kernel")); + if (PCB_USER_FPU(td->td_pcb)) + panic("Unregistered use of FPU in kernel"); fpudna(); goto out; Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Wed Aug 17 07:07:29 2016 (r304261) +++ stable/10/sys/i386/i386/trap.c Wed Aug 17 07:09:22 2016 (r304262) @@ -534,8 +534,8 @@ trap(struct trapframe *frame) case T_DNA: #ifdef DEV_NPX - KASSERT(!PCB_USER_FPU(td->td_pcb), - ("Unregistered use of FPU in kernel")); + if (PCB_USER_FPU(td->td_pcb)) + panic("Unregistered use of FPU in kernel"); if (npxdna()) goto out; #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608170709.u7H79N0a000157>