summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-06-28 04:25:20 +0000
committerkib <kib@FreeBSD.org>2017-06-28 04:25:20 +0000
commitdbddf865df49a518c3ec48975a59c67c6e2b0a9c (patch)
treeb4bf049f259ec5a2e99e5bbe06feed6b522c0974
parentb497b3ce303caf124e91812fdd0aae50dad2f89b (diff)
downloadFreeBSD-src-dbddf865df49a518c3ec48975a59c67c6e2b0a9c.zip
FreeBSD-src-dbddf865df49a518c3ec48975a59c67c6e2b0a9c.tar.gz
MFC r320201:
Assert that the protection of a new map entry is a subset of the max protection. Approved by: re (delphij)
-rw-r--r--sys/vm/vm_map.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 9686a67..ae30a94 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1190,6 +1190,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
("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.
OpenPOWER on IntegriCloud