diff options
author | dfr <dfr@FreeBSD.org> | 2004-08-04 08:58:58 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2004-08-04 08:58:58 +0000 |
commit | ad7bd36e4c98a8031c05f6a1de6b3f70ccbf974a (patch) | |
tree | 6d56fb315c7a66bf8976ab3c27aab83bcece6530 | |
parent | 5d5e3bbc55dc90751725290d9c75fb3b4c243ff1 (diff) | |
download | FreeBSD-src-ad7bd36e4c98a8031c05f6a1de6b3f70ccbf974a.zip FreeBSD-src-ad7bd36e4c98a8031c05f6a1de6b3f70ccbf974a.tar.gz |
In dev_pager_updatefake, m->valid is typically 0 on entry. It
should be set to VM_PAGE_BITS_ALL before returning, to ensure that
neither vm_pager_get_pages nor vm_fault calls vm_page_zero_invalid
after dev_pager_getpages has returned.
Submitted by: tegge
-rw-r--r-- | sys/vm/device_pager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index e7a256d..e1ce161 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -230,8 +230,8 @@ dev_pager_getpages(object, m, count, reqpage) * If the passed in reqpage page is a fake page, update it with * the new physical address. */ - dev_pager_updatefake(m[reqpage], paddr); VM_OBJECT_LOCK(object); + dev_pager_updatefake(m[reqpage], paddr); if (count > 1) { vm_page_lock_queues(); for (i = 0; i < count; i++) { @@ -323,4 +323,5 @@ dev_pager_updatefake(m, paddr) if (!(m->flags & PG_FICTITIOUS)) panic("dev_pager_updatefake: bad page"); m->phys_addr = paddr; + m->valid = VM_PAGE_BITS_ALL; } |