diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sh/sh/trap.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c index e3422bcb281..b092cc23490 100644 --- a/sys/arch/sh/sh/trap.c +++ b/sys/arch/sh/sh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.46 2020/10/21 17:54:33 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.47 2020/10/21 19:12:58 deraadt Exp $ */ /* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */ /* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */ @@ -418,12 +418,8 @@ tlb_exception(struct proc *p, struct trapframe *tf, uint32_t va) err = uvm_fault(map, va, 0, access_type); /* User stack extension */ - if (map != kernel_map) { - if (err == 0) - uvm_grow(p, va); - else if (err == EACCES) - err = EFAULT; - } + if (err == 0 && map != kernel_map) + uvm_grow(p, va); /* Page in. load PTE to TLB. */ if (err == 0) { |