diff options
author | kib <kib@FreeBSD.org> | 2013-09-24 13:52:47 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-09-24 13:52:47 +0000 |
commit | 8e50b328e4ddad34b88719c05a56867515ac46c0 (patch) | |
tree | 86ca0dcbf88674fe436175ebe2a0c8963bd29617 /sys/amd64/amd64/pmap.c | |
parent | 02a8f348b2807034c78dfee797d2e3a2c775d7d8 (diff) | |
download | FreeBSD-src-8e50b328e4ddad34b88719c05a56867515ac46c0.zip FreeBSD-src-8e50b328e4ddad34b88719c05a56867515ac46c0.tar.gz |
In pmap_clear_modify(), initialize pvh even for fictitious managed
page, otherwise the small mappings loop would use uninitialized value.
Note that currently pmap_clear_modify() is not called for fictitious
pages.
Sponsored by: The FreeBSD Foundation
Approved by: re (glebius)
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index e4a662a..5cc99a5 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -5331,13 +5331,13 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); rw_rlock(&pvh_global_lock); lock = VM_PAGE_TO_PV_LIST_LOCK(m); rw_wlock(lock); restart: if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { |