diff options
author | kib <kib@FreeBSD.org> | 2014-04-05 14:24:29 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-04-05 14:24:29 +0000 |
commit | 660fbf80db59d8c5f61b096f8f93fbf4a0b1bccf (patch) | |
tree | 258c013915d755d039a51345e60747916b796ae6 | |
parent | 0e5fcf594cf83d89f3eebe4b08ce24c79f47cf2a (diff) | |
download | FreeBSD-src-660fbf80db59d8c5f61b096f8f93fbf4a0b1bccf.zip FreeBSD-src-660fbf80db59d8c5f61b096f8f93fbf4a0b1bccf.tar.gz |
MFC r263912:
Clear the kernel grab of the FPU state on fork.
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 1e3d8f5..12f4978 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -446,7 +446,8 @@ cpu_set_upcall(struct thread *td, struct thread *td0) * 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); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index a82f3f1..ef99b76 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -457,7 +457,8 @@ cpu_set_upcall(struct thread *td, struct thread *td0) * 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; /* |