svn commit: r264228 - projects/sendfile/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Mon Apr 7 13:03:59 UTC 2014
Author: glebius
Date: Mon Apr 7 13:03:58 2014
New Revision: 264228
URL: http://svnweb.freebsd.org/changeset/base/264228
Log:
Do not assert that pages grabbed for readahead, are still there.
A race is possible when at this point read has already completed,
and since we do not hold wiring on the page, VM is able to remove
it from object.
Sponsored by: Nginx, Inc.
Sponsored by: Netflix
Modified:
projects/sendfile/sys/kern/uipc_syscalls.c
Modified: projects/sendfile/sys/kern/uipc_syscalls.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_syscalls.c Mon Apr 7 13:02:05 2014 (r264227)
+++ projects/sendfile/sys/kern/uipc_syscalls.c Mon Apr 7 13:03:58 2014 (r264228)
@@ -2796,7 +2796,7 @@ sendfile_swapin(vm_object_t obj, struct
SFSTAT_INC(sf_iocnt);
nios++;
- for (j = i; j < i + count; j++)
+ for (j = i; j < i + count && j < npages; j++)
KASSERT(pa[j] == vm_page_lookup(obj,
OFF_TO_IDX(vmoff(j, off))),
("pa[j] %p lookup %p\n", pa[j],
More information about the svn-src-projects
mailing list