diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-10-21 17:54:34 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-10-21 17:54:34 +0000 |
commit | 968fd9cb2169ef30e36a024267f070a5ccf05e38 (patch) | |
tree | a817627e0f29b469b8b0723bbd222a24b612526a /sys/arch/sparc64 | |
parent | f95e1b7ca967a2fe568b0987ee4d1eefaa06eeaa (diff) |
uvm_grow() now does the vm_maxsaddr check (before locking), so callers don't
need to do it
ok kettenis
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index 1784b3ef81a..7cc15c50792 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.105 2020/09/24 23:49:59 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.106 2020/10/21 17:54:33 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -811,7 +811,7 @@ data_access_fault(struct trapframe64 *tf, unsigned type, vaddr_t pc, * the current limit and we need to reflect that as an access * error. */ - if (rv == 0 && (caddr_t)va >= vm->vm_maxsaddr) + if (rv == 0) uvm_grow(p, va); if (rv != 0) { @@ -999,7 +999,7 @@ text_access_fault(struct trapframe64 *tf, unsigned type, vaddr_t pc, * the current limit and we need to reflect that as an access * error. */ - if (rv == 0 && (caddr_t)va >= vm->vm_maxsaddr) + if (rv == 0) uvm_grow(p, va); if (rv != 0) { @@ -1108,9 +1108,8 @@ text_access_error(struct trapframe64 *tf, unsigned type, vaddr_t pc, * the current limit and we need to reflect that as an access * error. */ - if (rv == 0 && (caddr_t)va >= vm->vm_maxsaddr) { + if (rv == 0) uvm_grow(p, va); - } if (rv != 0) { /* |