Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm PR kern/55300: ubciomove triggers page not dirty ass...



details:   https://anonhg.NetBSD.org/src/rev/ee9d744eb056
branches:  trunk
changeset: 933494:ee9d744eb056
user:      ad <ad%NetBSD.org@localhost>
date:      Mon May 25 20:13:00 2020 +0000

description:
PR kern/55300: ubciomove triggers page not dirty assertion

If overwriting an existing page, mark it dirty since there may be no
managed mapping to track the modification.

diffstat:

 sys/uvm/uvm_aobj.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 6e0666628764 -r ee9d744eb056 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c        Mon May 25 19:49:28 2020 +0000
+++ b/sys/uvm/uvm_aobj.c        Mon May 25 20:13:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_aobj.c,v 1.144 2020/05/22 19:02:59 ad Exp $        */
+/*     $NetBSD: uvm_aobj.c,v 1.145 2020/05/25 20:13:00 ad Exp $        */
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.144 2020/05/22 19:02:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.145 2020/05/25 20:13:00 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -963,6 +963,9 @@
 
                        KASSERT(uvm_pagegetdirty(ptmp) !=
                            UVM_PAGE_STATUS_CLEAN);
+                       if (overwrite) {
+                               uvm_pagemarkdirty(ptmp, UVM_PAGE_STATUS_DIRTY);
+                       }
                        /* we own it, caller must un-busy */
                        ptmp->flags |= PG_BUSY;
                        UVM_PAGE_OWN(ptmp, "uao_get2");



Home | Main Index | Thread Index | Old Index