Date: Wed, 17 Aug 2016 07:07:24 +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-11@freebsd.org Subject: svn commit: r304260 - in stable/11/sys: amd64/amd64 i386/i386 Message-ID: <201608170707.u7H77O9Z099866@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Aug 17 07:07:24 2016 New Revision: 304260 URL: https://svnweb.freebsd.org/changeset/base/304260 Log: MFC r303913: Unconditionally perform checks that FPU region was entered, when #NM exception is caught in kernel mode. Modified: stable/11/sys/amd64/amd64/trap.c stable/11/sys/i386/i386/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/trap.c ============================================================================== --- stable/11/sys/amd64/amd64/trap.c Wed Aug 17 06:58:43 2016 (r304259) +++ stable/11/sys/amd64/amd64/trap.c Wed Aug 17 07:07:24 2016 (r304260) @@ -443,8 +443,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/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Wed Aug 17 06:58:43 2016 (r304259) +++ stable/11/sys/i386/i386/trap.c Wed Aug 17 07:07:24 2016 (r304260) @@ -540,8 +540,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?201608170707.u7H77O9Z099866>