Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm the previous fix for PR 55366 in uvm_amap.c 1.124 wa...
details: https://anonhg.NetBSD.org/src/rev/2fa90f06c9d2
branches: trunk
changeset: 955148:2fa90f06c9d2
user: chs <chs%NetBSD.org@localhost>
date: Mon Sep 21 18:41:59 2020 +0000
description:
the previous fix for PR 55366 in uvm_amap.c 1.124 was incomplete:
- amap_adjref_anons() must also ignore AMAP_REFALL when updating
the ppref, not just when deciding whether or not to initialize ppref.
- UVM_EXTRACT_QREF relies on AMAP_REFALL to work properly,
and since we can't use AMAP_REFALL then we can't use QREF either.
diffstat:
sys/uvm/uvm_amap.c | 10 +++-------
sys/uvm/uvm_io.c | 8 ++++++--
2 files changed, 9 insertions(+), 9 deletions(-)
diffs (60 lines):
diff -r bcd27e098733 -r 2fa90f06c9d2 sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c Mon Sep 21 17:52:31 2020 +0000
+++ b/sys/uvm/uvm_amap.c Mon Sep 21 18:41:59 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_amap.c,v 1.124 2020/09/20 23:03:01 chs Exp $ */
+/* $NetBSD: uvm_amap.c,v 1.125 2020/09/21 18:41:59 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.124 2020/09/20 23:03:01 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.125 2020/09/21 18:41:59 chs Exp $");
#include "opt_uvmhist.h"
@@ -1602,11 +1602,7 @@
#ifdef UVM_AMAP_PPREF
if (amap->am_ppref && amap->am_ppref != PPREF_NONE) {
- if (all) {
- amap_pp_adjref(amap, 0, amap->am_nslot, refv);
- } else {
- amap_pp_adjref(amap, offset, len, refv);
- }
+ amap_pp_adjref(amap, offset, len, refv);
}
#endif
amap_unlock(amap);
diff -r bcd27e098733 -r 2fa90f06c9d2 sys/uvm/uvm_io.c
--- a/sys/uvm/uvm_io.c Mon Sep 21 17:52:31 2020 +0000
+++ b/sys/uvm/uvm_io.c Mon Sep 21 18:41:59 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_io.c,v 1.28 2016/05/25 17:43:58 christos Exp $ */
+/* $NetBSD: uvm_io.c,v 1.29 2020/09/21 18:41:59 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_io.c,v 1.28 2016/05/25 17:43:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_io.c,v 1.29 2020/09/21 18:41:59 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -87,6 +87,10 @@
error = 0;
flags |= UVM_EXTRACT_QREF | UVM_EXTRACT_CONTIG | UVM_EXTRACT_FIXPROT;
+
+ /* XXX cannot use QREF with without AMAP_REFALL, and REFALL is unsafe */
+ flags &= ~UVM_EXTRACT_QREF;
+
/*
* step 1: main loop... while we've got data to move
*/
Home |
Main Index |
Thread Index |
Old Index