aboutsummaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 59f08e802d2b..056dc4e54d6f 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -70,6 +70,8 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/vmmeter.h>
#include <sys/mman.h>
@@ -149,6 +151,10 @@ static void vm_map_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t,
static void vm_map_split __P((vm_map_entry_t));
static void vm_map_unclip_range __P((vm_map_t map, vm_map_entry_t start_entry, vm_offset_t start, vm_offset_t end, int flags));
+static int old_msync;
+SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0,
+ "Use old (insecure) msync behavior");
+
void
vm_map_startup()
{
@@ -2013,7 +2019,7 @@ vm_map_clean(map, start, end, syncio, invalidate)
vm_object_page_remove(object,
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + size + PAGE_MASK),
- FALSE);
+ old_msync ? FALSE : TRUE);
vm_object_deallocate(object);
}
start += size;