summaryrefslogtreecommitdiffstats
path: root/sys/i386/i386
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-09-20 14:24:48 +0000
committerkib <kib@FreeBSD.org>2014-09-20 14:24:48 +0000
commit42e5d75eb4732b7263715125594ad5bb40b9d22f (patch)
treec1181716db63765145cd6081054a552ac82ac4f0 /sys/i386/i386
parentb701075b7bcf07792093013997bbceb79bde0d9e (diff)
downloadFreeBSD-src-42e5d75eb4732b7263715125594ad5bb40b9d22f.zip
FreeBSD-src-42e5d75eb4732b7263715125594ad5bb40b9d22f.tar.gz
MFC r271716:
Presence of any VM_PROT bits in the permission argument on x86 implies that the entry is readable and valid. Approved by: re (gjb)
Diffstat (limited to 'sys/i386/i386')
-rw-r--r--sys/i386/i386/pmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index d5c2cbe..9e8f2ee 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -3161,7 +3161,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
pt_entry_t *pte;
boolean_t anychanged, pv_lists_locked;
- if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
+ KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot));
+ if (prot == VM_PROT_NONE) {
pmap_remove(pmap, sva, eva);
return;
}
OpenPOWER on IntegriCloud