summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2020-10-21 22:01:52 +0000
committerderaadt <deraadt@openbsd.org>2020-10-21 22:01:52 +0000
commit61aa4f7413065a72b7f875d6011a0e56deb96fe4 (patch)
treee3bfd61ebfd77f05f54fa41e765ba12b59b6f8ab
parentwhitespace (diff)
downloadwireguard-openbsd-61aa4f7413065a72b7f875d6011a0e56deb96fe4.tar.xz
wireguard-openbsd-61aa4f7413065a72b7f875d6011a0e56deb96fe4.zip
(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;