From 3b86738bf339a038f824d7b588ec228de0aa38bf Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 16 Jan 2004 12:42:41 +0000 Subject: [PATCH] Don't rely on proc_trampoline to clear condition codes for a new child process on fork - it could be overtaken by a signal delivery and then use the stale condition code in the trap frame. Instead, set tf_tstate aproprietaly right from the start. Fixes PR sparc64/20675. Many thanks to Paul Kranenburg for hints on a similar problem he fixed for the sparc port. --- sys/arch/sparc64/sparc64/vm_machdep.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index 21f5dbde9de3..b649898dfe2b 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.53 2004/01/04 11:33:31 jdolecek Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.54 2004/01/16 12:42:41 martin Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.53 2004/01/04 11:33:31 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.54 2004/01/16 12:42:41 martin Exp $"); #include #include @@ -296,7 +296,9 @@ cpu_lwp_fork(l1, l2, stack, stacksize, func, arg) tf2->tf_tstate = (ASI_PRIMARY_NO_FAULT<tf_tstate &= ~(PSTATE_PEF<tf_tstate &= + ~((PSTATE_PEF<