diff options
author | kib <kib@FreeBSD.org> | 2017-06-28 04:25:20 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2017-06-28 04:25:20 +0000 |
commit | dbddf865df49a518c3ec48975a59c67c6e2b0a9c (patch) | |
tree | b4bf049f259ec5a2e99e5bbe06feed6b522c0974 /sys/vm | |
parent | b497b3ce303caf124e91812fdd0aae50dad2f89b (diff) | |
download | FreeBSD-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)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_map.c | 2 |
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. |