From 9a80b9608fbaaf1c724382150b088af3c42b7371 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 13 Jun 2011 21:12:50 +0000 Subject: [PATCH] If uvm_fault returns EACCES, convert it to EFAULT. --- sys/arch/powerpc/booke/trap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arch/powerpc/booke/trap.c b/sys/arch/powerpc/booke/trap.c index 4de300e7352e..ed3eb825b524 100644 --- a/sys/arch/powerpc/booke/trap.c +++ b/sys/arch/powerpc/booke/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.8 2011/06/12 05:32:38 matt Exp $ */ +/* $NetBSD: trap.c,v 1.9 2011/06/13 21:12:50 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,7 +39,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.8 2011/06/12 05:32:38 matt Exp $"); +__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.9 2011/06/13 21:12:50 matt Exp $"); #include #include @@ -177,6 +177,8 @@ pagefault(struct vm_map *map, vaddr_t va, vm_prot_t ftype, bool usertrap) rv = uvm_fault(map, trunc_page(va), ftype); if (rv == 0) uvm_grow(l->l_proc, trunc_page(va)); + if (rv == EACCES) + rv = EFAULT; #ifdef KERN_SA l->l_pflag &= ~LP_SA_PAGEFAULT; #endif