diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 22:00:54 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 22:00:54 +0200 |
commit | bb2c018b09b681d43f5e08124b83e362647ea82b (patch) | |
tree | d794902c78f9fdd04ed88a4b8d451ed6f9292ec0 /mm | |
parent | Merge branch 'linus' into cpus4096 (diff) | |
parent | Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-bb2c018b09b681d43f5e08124b83e362647ea82b.tar.xz linux-bb2c018b09b681d43f5e08124b83e362647ea82b.zip |
Merge branch 'linus' into cpus4096
Conflicts:
drivers/acpi/processor_throttling.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 5 | ||||
-rw-r--r-- | mm/mprotect.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 3354fdd83d4b..1d102b956fd8 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -72,8 +72,9 @@ pgprot_t protection_map[16] = { pgprot_t vm_get_page_prot(unsigned long vm_flags) { - return protection_map[vm_flags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; + return __pgprot(pgprot_val(protection_map[vm_flags & + (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) | + pgprot_val(arch_vm_get_page_prot(vm_flags))); } EXPORT_SYMBOL(vm_get_page_prot); diff --git a/mm/mprotect.c b/mm/mprotect.c index acfe7c8d72fc..360d9cc8b38c 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -237,7 +237,7 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot) end = start + len; if (end <= start) return -ENOMEM; - if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) + if (!arch_validate_prot(prot)) return -EINVAL; reqprot = prot; |