Author: kib
Date: Wed Jun 28 04:53:06 2017
New Revision: 320435
URL: https://svnweb.freebsd.org/changeset/base/320435

Log:
  MFC r320201:
  Assert that the protection of a new map entry is a subset of the max
  protection.

Modified:
  stable/10/sys/vm/vm_map.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_map.c
==============================================================================
--- stable/10/sys/vm/vm_map.c   Wed Jun 28 04:25:20 2017        (r320434)
+++ stable/10/sys/vm/vm_map.c   Wed Jun 28 04:53:06 2017        (r320435)
@@ -1143,6 +1143,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof
            ("vm_map_insert: kmem or kernel object and COW"));
        KASSERT(object == NULL || (cow & MAP_NOFAULT) == 0,
            ("vm_map_insert: paradoxical MAP_NOFAULT request"));
+       KASSERT((prot & ~max) == 0,
+           ("prot %#x is not subset of max_prot %#x", prot, max));
 
        /*
         * Check that the start and end points are not bogus.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"

Reply via email to