diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-23 19:49:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-23 19:49:01 +0000 |
commit | 6fa0cfa9a3789672215e42898c9fa4a19f2f2f20 (patch) | |
tree | 10c863e467e23e2276efcf0c33ef87e5ec310e7a /sys | |
parent | 009efda1e9489a8fbcb939a697474885db674e46 (diff) |
Make sure child_return() returns with carry clear and r0 = r1 = 0.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/vax/trap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/vax/vax/trap.c b/sys/arch/vax/vax/trap.c index f6893793036..9774a6b33ad 100644 --- a/sys/arch/vax/vax/trap.c +++ b/sys/arch/vax/vax/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.32 2005/09/15 21:14:27 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.33 2005/12/23 19:49:00 miod Exp $ */ /* $NetBSD: trap.c,v 1.47 1999/08/21 19:26:20 matt Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -472,8 +472,13 @@ child_return(arg) void *arg; { struct proc *p = arg; + struct trapframe *frame; + + frame = p->p_addr->u_pcb.framep; + frame->r1 = frame->r0 = 0; + frame->psl &= ~PSL_C; - userret(p, p->p_addr->u_pcb.framep, 0); + userret(p, frame, 0); #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) |