sendfile() was seriously broken. It was calling vm_page_free() without
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 20 Nov 2004 20:35:33 +0000 (20:35 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 20 Nov 2004 20:35:33 +0000 (20:35 +0000)
commitf2555cdd59f525c2f43af64c4ed09c3a44de6ae3
treecae460b64897db5a30274bee984a1b577df175b5
parent0d1dffdf67f773448571bda0795b5b394ec642ba
sendfile() was seriously broken.  It was calling vm_page_free() without
busying the underlying page, causing a panic on kernels compiled with
INVARIANTS and potentially corrupting data on kernels compiles without
INVARIANTS.  Change the calls to vm_page_try_to_free().

Symtoms: system crash when Apache2 tries to use sendfile() to send large files.
Reported-by: Jedi/Sector One <j@pureftpd.org>
sys/kern/uipc_syscalls.c