Module Name: src
Committed By: ad
Date: Mon May 25 20:13:00 UTC 2020
Modified Files:
src/sys/uvm: uvm_aobj.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/uvm/uvm_aobj.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.144 src/sys/uvm/uvm_aobj.c:1.145
--- src/sys/uvm/uvm_aobj.c:1.144 Fri May 22 19:02:59 2020
+++ src/sys/uvm/uvm_aobj.c Mon May 25 20:13:00 2020
@@ -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 @@ uao_get(struct uvm_object *uobj, voff_t
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");