svn commit: r339204 - stable/11/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Fri Oct 5 18:15:45 UTC 2018
Author: kib
Date: Fri Oct 5 18:15:44 2018
New Revision: 339204
URL: https://svnweb.freebsd.org/changeset/base/339204
Log:
MFC r338999:
Correct vm_fault_copy_entry() handling of backing file truncation
after the file mapping was wired.
Modified:
stable/11/sys/vm/vm_fault.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/vm/vm_fault.c
==============================================================================
--- stable/11/sys/vm/vm_fault.c Fri Oct 5 18:14:18 2018 (r339203)
+++ stable/11/sys/vm/vm_fault.c Fri Oct 5 18:15:44 2018 (r339204)
@@ -1711,6 +1711,13 @@ again:
dst_m = src_m;
if (vm_page_sleep_if_busy(dst_m, "fltupg"))
goto again;
+ if (dst_m->pindex >= dst_object->size)
+ /*
+ * We are upgrading. Index can occur
+ * out of bounds if the object type is
+ * vnode and the file was truncated.
+ */
+ break;
vm_page_xbusy(dst_m);
KASSERT(dst_m->valid == VM_PAGE_BITS_ALL,
("invalid dst page %p", dst_m));
More information about the svn-src-stable
mailing list