diff options
author | grehan <grehan@FreeBSD.org> | 2012-10-26 22:32:26 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2012-10-26 22:32:26 +0000 |
commit | dc37578ed255be09cc4e4fcd2ebf48781c91eabc (patch) | |
tree | 4946ae2ad93a084661f083703a9349a849425f36 /sys/amd64 | |
parent | 1372a368e0c75317b5fcf37426faaabc995735c9 (diff) | |
download | FreeBSD-src-dc37578ed255be09cc4e4fcd2ebf48781c91eabc.zip FreeBSD-src-dc37578ed255be09cc4e4fcd2ebf48781c91eabc.tar.gz |
Set the valid field of the newly allocated field as all other
vm page allocators do. This fixes a panic when a virtio block
device is mounted as root, with the host system dying in
vm_page_dirty with invalid bits.
Reviewed by: neel
Obtained from: NetApp
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/vmm/vmm_mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/vmm/vmm_mem.c b/sys/amd64/vmm/vmm_mem.c index 8745339..04f99b1 100644 --- a/sys/amd64/vmm/vmm_mem.c +++ b/sys/amd64/vmm/vmm_mem.c @@ -99,6 +99,7 @@ vmm_mem_alloc(size_t size) if ((m->flags & PG_ZERO) == 0) pagezero((void *)PHYS_TO_DMAP(pa)); + m->valid = VM_PAGE_BITS_ALL; update_pages_allocated(1); |