Author: kib
Date: Wed Sep 11 04:59:27 2019
New Revision: 352203
URL: https://svnweb.freebsd.org/changeset/base/352203
Log:
MFC r351830:
madvise(MADV_FREE): Quick fix to time rewind.
PR: 240061
Modified:
stable/11/sys/vm/vm_map.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/vm/vm_map.c
==============================================================================
--- stable/11/sys/vm/vm_map.c Wed Sep 11 04:55:10 2019 (r352202)
+++ stable/11/sys/vm/vm_map.c Wed Sep 11 04:59:27 2019 (r352203)
@@ -2279,6 +2279,18 @@ vm_map_madvise(
if (current->eflags & MAP_ENTRY_IS_SUB_MAP)
continue;
+ /*
+ * MADV_FREE would otherwise rewind time to
+ * the creation of the shadow object. Because
+ * we hold the VM map read-locked, neither the
+ * entry's object nor the presence of a
+ * backing object can change.
+ */
+ if (behav == MADV_FREE &&
+ current->object.vm_object != NULL &&
+ current->object.vm_object->backing_object != NULL)
+ continue;
+
pstart = OFF_TO_IDX(current->offset);
pend = pstart + atop(current->end - current->start);
useStart = current->start;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"