From: jca Date: Sun, 3 Sep 2023 00:03:30 +0000 (+0000) Subject: pmap_page_protect() should not unmap pages after making them readonly. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d4bf169dfd3094849c8bc7aa1f41454c16603b77;p=openbsd pmap_page_protect() should not unmap pages after making them readonly. This brings riscv64/pmap.c in line with arm64/pmap.c, original fix by drahn@ ok miod@ kettenis@ mlarkin@ --- diff --git a/sys/arch/riscv64/riscv64/pmap.c b/sys/arch/riscv64/riscv64/pmap.c index 42e553ec2ce..069dfac8cf1 100644 --- a/sys/arch/riscv64/riscv64/pmap.c +++ b/sys/arch/riscv64/riscv64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.30 2023/04/13 15:23:22 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.31 2023/09/03 00:03:30 jca Exp $ */ /* * Copyright (c) 2019-2020 Brian Bamsch @@ -1523,6 +1523,7 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) pmap_page_ro(pted->pted_pmap, pted->pted_va, prot); } mtx_leave(&pg->mdpage.pv_mtx); + return; } mtx_enter(&pg->mdpage.pv_mtx);