Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/booke If uvm_fault returns EACCES, convert ...



details:   https://anonhg.NetBSD.org/src/rev/dce3a9143ab5
branches:  trunk
changeset: 766023:dce3a9143ab5
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jun 13 21:12:50 2011 +0000

description:
If uvm_fault returns EACCES, convert it to EFAULT.

diffstat:

 sys/arch/powerpc/booke/trap.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r ae6d5d9fa03e -r dce3a9143ab5 sys/arch/powerpc/booke/trap.c
--- a/sys/arch/powerpc/booke/trap.c     Mon Jun 13 20:41:00 2011 +0000
+++ b/sys/arch/powerpc/booke/trap.c     Mon Jun 13 21:12:50 2011 +0000
@@ -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 <sys/cdefs.h>
 
-__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 <sys/param.h>
 #include <sys/systm.h>
@@ -177,6 +177,8 @@
                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



Home | Main Index | Thread Index | Old Index