diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2008-05-30 23:10:17 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2008-05-30 23:10:17 +0000 |
commit | 1934e0b036c4587f2c9e5badc1103bc8c70a331a (patch) | |
tree | 101cd5b96c11acac81163dabb8ea2d8999a6c65d /sys | |
parent | 3910ed59e141eb1d73e6b6d1bc6330cbc8628ad9 (diff) |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
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. */ |