summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mips64/mips64/vm_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/vm_machdep.c b/sys/arch/mips64/mips64/vm_machdep.c
index 506ecd1644c..d4f0f367ce3 100644
--- a/sys/arch/mips64/mips64/vm_machdep.c
+++ b/sys/arch/mips64/mips64/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.37 2017/09/02 15:56:29 visa Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.38 2019/11/20 14:07:25 visa Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
@@ -135,7 +135,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, void *tcb,
}
pcb->pcb_context.val[10] = (register_t)proc_trampoline;
pcb->pcb_context.val[8] = (register_t)pcb +
- USPACE - sizeof(struct trapframe);
+ ((USPACE - sizeof(struct trapframe)) & ~_STACKALIGNBYTES);
pcb->pcb_context.val[1] = (register_t)arg;
pcb->pcb_context.val[0] = (register_t)func;
}