diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-08-12 18:07:36 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-08-12 18:07:36 +0000 |
commit | 47b693e8fcaf8b4f44dddb00bc82907fd6728fa2 (patch) | |
tree | 81634a555e4f1357b0d5d08f674e4f47919a4cf5 /sys/arch | |
parent | 58607d64af80ccda019a9bed71e53821c154db9c (diff) |
Clear pcb_fpcpu of the child upon fork. Not clearing it is probably not
a critical issue as the pointer back to the proc in the struct cpu_info
won't match, but it is better to avoid dangling pointers like this.
ok patrick@, drahn@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm64/arm64/vm_machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/arm64/arm64/vm_machdep.c b/sys/arch/arm64/arm64/vm_machdep.c index d328a4ddbbc..2fd9008d764 100644 --- a/sys/arch/arm64/arm64/vm_machdep.c +++ b/sys/arch/arm64/arm64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.3 2017/02/20 21:12:14 patrick Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.4 2017/08/12 18:07:35 kettenis Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 2003/04/26 18:39:33 fvdl Exp $ */ /*- @@ -75,8 +75,9 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, void *tcb, // Does any flushing need to be done if process was running? - // Copy the pcb. + /* Copy the pcb. */ *pcb = p1->p_addr->u_pcb; + pcb->pcb_fpcpu = NULL; pmap_activate(p2); |