svn commit: r264148 - in stable/9/sys: amd64/amd64 i386/i386

Konstantin Belousov kib at FreeBSD.org
Sat Apr 5 14:24:46 UTC 2014


Author: kib
Date: Sat Apr  5 14:24:45 2014
New Revision: 264148
URL: http://svnweb.freebsd.org/changeset/base/264148

Log:
  MFC r263912:
  Clear the kernel grab of the FPU state on fork.

Modified:
  stable/9/sys/amd64/amd64/vm_machdep.c
  stable/9/sys/i386/i386/vm_machdep.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/vm_machdep.c
==============================================================================
--- stable/9/sys/amd64/amd64/vm_machdep.c	Sat Apr  5 14:24:29 2014	(r264147)
+++ stable/9/sys/amd64/amd64/vm_machdep.c	Sat Apr  5 14:24:45 2014	(r264148)
@@ -446,7 +446,8 @@ cpu_set_upcall(struct thread *td, struct
 	 * values here.
 	 */
 	bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
-	clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE);
+	clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE |
+	    PCB_KERNFPU);
 	pcb2->pcb_save = get_pcb_user_save_pcb(pcb2);
 	bcopy(get_pcb_user_save_td(td0), pcb2->pcb_save,
 	    cpu_max_ext_state_size);

Modified: stable/9/sys/i386/i386/vm_machdep.c
==============================================================================
--- stable/9/sys/i386/i386/vm_machdep.c	Sat Apr  5 14:24:29 2014	(r264147)
+++ stable/9/sys/i386/i386/vm_machdep.c	Sat Apr  5 14:24:45 2014	(r264148)
@@ -444,7 +444,8 @@ cpu_set_upcall(struct thread *td, struct
 	 * values here.
 	 */
 	bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
-	pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE);
+	pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE |
+	    PCB_KERNNPX);
 	pcb2->pcb_save = &pcb2->pcb_user_save;
 
 	/*


More information about the svn-src-stable-9 mailing list