svn commit: r320201 - head/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Wed Jun 21 18:51:32 UTC 2017
Author: kib
Date: Wed Jun 21 18:51:30 2017
New Revision: 320201
URL: https://svnweb.freebsd.org/changeset/base/320201
Log:
Assert that the protection of a new map entry is a subset of the max
protection.
Noted and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/vm/vm_map.c
Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c Wed Jun 21 18:28:37 2017 (r320200)
+++ head/sys/vm/vm_map.c Wed Jun 21 18:51:30 2017 (r320201)
@@ -1190,6 +1190,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.
More information about the svn-src-all
mailing list