mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Correct two errors in PG_BUSY management by vm_page_cowfault(). Both
errors are in rarely executed paths. 1. Each time the retry_alloc path is taken, the PG_BUSY must be set again. Otherwise vm_page_remove() panics. 2. There is no need to set PG_BUSY on the newly allocated page before freeing it. The page already has PG_BUSY set by vm_page_alloc(). Setting it again could cause an assertion failure. MFC after: 2 weeks
This commit is contained in:
parent
e1d0efc09d
commit
1e96d2a217
1 changed files with 1 additions and 2 deletions
|
|
@ -1656,9 +1656,9 @@ vm_page_cowfault(vm_page_t m)
|
|||
|
||||
object = m->object;
|
||||
pindex = m->pindex;
|
||||
vm_page_busy(m);
|
||||
|
||||
retry_alloc:
|
||||
vm_page_busy(m);
|
||||
vm_page_remove(m);
|
||||
mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL);
|
||||
if (mnew == NULL) {
|
||||
|
|
@ -1677,7 +1677,6 @@ vm_page_cowfault(vm_page_t m)
|
|||
* waiting to allocate a page. If so, put things back
|
||||
* the way they were
|
||||
*/
|
||||
vm_page_busy(mnew);
|
||||
vm_page_free(mnew);
|
||||
vm_page_insert(m, object, pindex);
|
||||
} else { /* clear COW & copy page */
|
||||
|
|
|
|||
Loading…
Reference in a new issue