Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm ubc_alloc: perform pmap_update() in the error path a...



details:   https://anonhg.NetBSD.org/src/rev/f90ee643645d
branches:  trunk
changeset: 338494:f90ee643645d
user:      rmind <rmind%NetBSD.org@localhost>
date:      Wed May 27 19:43:40 2015 +0000

description:
ubc_alloc: perform pmap_update() in the error path as we might have
removed the mapping.

diffstat:

 sys/uvm/uvm_bio.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 9a74ec52fba2 -r f90ee643645d sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Wed May 27 18:13:14 2015 +0000
+++ b/sys/uvm/uvm_bio.c Wed May 27 19:43:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_bio.c,v 1.82 2014/09/05 09:24:21 matt Exp $        */
+/*     $NetBSD: uvm_bio.c,v 1.83 2015/05/27 19:43:40 rmind Exp $       */
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.82 2014/09/05 09:24:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.83 2015/05/27 19:43:40 rmind Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_ubc.h"
@@ -581,6 +581,10 @@
                    &npages, 0, VM_PROT_READ | VM_PROT_WRITE, advice, gpflags);
                UVMHIST_LOG(ubchist, "faultbusy getpages %d", error, 0, 0, 0);
                if (error) {
+                       /*
+                        * Flush: the mapping above might have been removed.
+                        */
+                       pmap_update(pmap_kernel());
                        goto out;
                }
                for (i = 0; i < npages; i++) {



Home | Main Index | Thread Index | Old Index