Date: Fri, 5 Oct 2018 18:15:44 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339204 - stable/11/sys/vm Message-ID: <201810051815.w95IFim7020002@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810051815.w95IFim7020002>