Fixed a certain panic on IO error in sendfile(): Page must be set PG_BUSY
before calling vm_page_free() on it.
This commit is contained in:
parent
3110b2627a
commit
b529eb36e4
@ -1599,8 +1599,10 @@ sendfile(struct proc *p, struct sendfile_args *uap)
|
||||
*/
|
||||
if (pg->wire_count == 0 && pg->valid == 0 &&
|
||||
pg->busy == 0 && !(pg->flags & PG_BUSY) &&
|
||||
pg->hold_count == 0)
|
||||
pg->hold_count == 0) {
|
||||
vm_page_busy(pg);
|
||||
vm_page_free(pg);
|
||||
}
|
||||
sbunlock(&so->so_snd);
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user