In vm_page_alloc_contig(), on vm_page_insert() failure, mark each

freed page as VPO_UNMANAGED.  Otherwise vm_pge_free_toq() insists on
owning the page lock.

Previously, VPO_UNMANAGED was only set up to the last processed page.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
kib 2016-05-24 10:21:39 +00:00
parent 2832c7177d
commit 187611e8d7

View File

@ -1944,8 +1944,10 @@ retry:
m < &m_ret[npages]; m++) {
if ((req & VM_ALLOC_WIRED) != 0)
m->wire_count = 0;
if (m >= m_tmp)
if (m >= m_tmp) {
m->object = NULL;
m->oflags |= VPO_UNMANAGED;
}
vm_page_free(m);
}
return (NULL);