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/4012f54d2bf6
branches:  trunk
changeset: 808636:4012f54d2bf6
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 7db8e2f2a4fe -r 4012f54d2bf6 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