In the last revision, I introduced a physical contiguity check that is both

unnecessary and wrong.  While it is necessary to verify that the page is
still free after dropping and reacquiring the free page queue lock, the
physical contiguity of the page can not change, making this check
unnecessary.  This check was wrong in that it could cause an out-of-bounds
array access.

Tested by:	rwatson
This commit is contained in:
Alan Cox 2004-03-05 04:46:32 +00:00
parent db396a8e55
commit 3b383f0922

View File

@ -232,9 +232,7 @@ again1:
mtx_lock_spin(&vm_page_queue_free_mtx);
for (i = start; i < (start + size / PAGE_SIZE); i++) {
pqtype = pga[i].queue - pga[i].pc;
if ((VM_PAGE_TO_PHYS(&pga[i]) !=
(VM_PAGE_TO_PHYS(&pga[i - 1]) + PAGE_SIZE)) ||
(pqtype != PQ_FREE)) {
if (pqtype != PQ_FREE) {
start++;
goto again;
}