From 866746b6a6c6b56dfe50027fde9b2dfecbdef8a6 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 12 Nov 2000 14:51:15 +0000 Subject: [PATCH] Fixed a certain panic on IO error in sendfile(): Page must be set PG_BUSY before calling vm_page_free() on it. --- sys/kern/uipc_syscalls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 83ddc355e93..ae7b7e9e4d3 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1599,8 +1599,10 @@ retry_lookup: */ 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; }