exec_map_first_page: fix an inverse condition introduced in r254138
While the bug itself was serious, as we could either pass a non-busied page to vm_pager_get_pages() or leak a busy page, it could only be triggered under a very rare condition where the page is already inserted into the object, but it is not valid yet. Reviewed by: kib MFC after: 2 weeks
This commit is contained in:
parent
7f180c0f80
commit
b2387aa652
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328996
@ -1009,7 +1009,7 @@ exec_map_first_page(imgp)
|
||||
if ((ma[i] = vm_page_next(ma[i - 1])) != NULL) {
|
||||
if (ma[i]->valid)
|
||||
break;
|
||||
if (vm_page_tryxbusy(ma[i]))
|
||||
if (!vm_page_tryxbusy(ma[i]))
|
||||
break;
|
||||
} else {
|
||||
ma[i] = vm_page_alloc(object, i,
|
||||
|
Loading…
Reference in New Issue
Block a user