summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-10-21 22:01:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-10-21 22:01:53 +0000
commit150aaf773ec3dc196734932dfb55a731c2d5d997 (patch)
treed537c82786d9ddcefe4a599697e28c8dace1241c
parentc13c88c292fa8c9b9861acd6012251e11758ad54 (diff)
(same as sh/sh/trap.c)
The condition around uvm_grow() can be simplified, as the error result adjustment is effectively a dead store ok kettenis
-rw-r--r--sys/arch/alpha/alpha/trap.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index ddc516a77b7..53b844baa88 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.94 2020/10/21 21:59:50 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.95 2020/10/21 22:01:52 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -437,12 +437,8 @@ do_fault:
* the stack region outside the current limit and
* we need to reflect that as an access error.
*/
- if (map != kernel_map) {
- if (rv == 0) {
- uvm_grow(p, va);
- } else if (rv == EACCES)
- rv = EFAULT;
- }
+ if (rv == 0 && map != kernel_map)
+ uvm_grow(p, va);
if (rv == 0) {
KERNEL_UNLOCK();
goto out;