From 1934e0b036c4587f2c9e5badc1103bc8c70a331a Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Fri, 30 May 2008 23:10:17 +0000 Subject: Remove the untracked mapping before calling uvm_km_free(), otherwise the code will treat it as a tracked one and panic down the road. fixes one of the crashes reported in PR/5828. miod@ ok. --- sys/arch/i386/i386/machdep.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index a6963256d47..8ad9a9cc827 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.428 2008/05/21 18:49:47 kettenis Exp $ */ +/* $OpenBSD: machdep.c,v 1.429 2008/05/30 23:10:16 fgsch Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -3577,6 +3577,9 @@ bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) (void) pmap_extract(pmap_kernel(), va, &bpa); bpa += (bsh & PGOFSET); + pmap_kremove(va, endva - va); + pmap_update(pmap_kernel()); + /* * Free the kernel virtual mapping. */ @@ -3621,6 +3624,9 @@ _bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size, (void) pmap_extract(pmap_kernel(), va, &bpa); bpa += (bsh & PGOFSET); + pmap_kremove(va, endva - va); + pmap_update(pmap_kernel()); + /* * Free the kernel virtual mapping. */ -- cgit v1.2.3