summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/hppa/trap.c5
-rw-r--r--sys/uvm/uvm_unix.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index 64879d4ddb0..9628cb45ed0 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.150 2020/10/08 19:41:04 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.151 2020/10/21 21:24:56 deraadt Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -498,8 +498,7 @@ datacc:
* the current limit and we need to reflect that as an access
* error.
*/
- if (ret == 0 && space != HPPA_SID_KERNEL &&
- va < (vaddr_t)vm->vm_minsaddr)
+ if (ret == 0 && space != HPPA_SID_KERNEL)
uvm_grow(p, va);
KERNEL_UNLOCK();
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c
index 8f7ce154295..82617cb0595 100644
--- a/sys/uvm/uvm_unix.c
+++ b/sys/uvm/uvm_unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_unix.c,v 1.70 2020/10/19 08:19:46 mpi Exp $ */
+/* $OpenBSD: uvm_unix.c,v 1.71 2020/10/21 21:24:57 deraadt Exp $ */
/* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */
/*
@@ -114,6 +114,10 @@ uvm_grow(struct proc *p, vaddr_t sp)
/* For user defined stacks (from sendsig). */
if (sp < (vaddr_t)vm->vm_maxsaddr)
return;
+#ifdef MACHINE_STACK_GROWS_UP
+ if (sp >= (vaddr_t)vm->vm_minsaddr)
+ return;
+#endif
vm_map_lock(map);