1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
This commit is contained in:
Doug Rabson 2004-08-04 08:58:58 +00:00
parent a69ff3e4ac
commit c413d99c4e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133113

View File

@ -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;
}