aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 16:00:54 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 16:00:54 -0400
commitbb2c018b09b681d43f5e08124b83e362647ea82b (patch)
treed794902c78f9fdd04ed88a4b8d451ed6f9292ec0 /mm
parent82638844d9a8581bbf33201cc209a14876eca167 (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
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.c5
-rw-r--r--mm/mprotect.c2
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] = {
72 72
73pgprot_t vm_get_page_prot(unsigned long vm_flags) 73pgprot_t vm_get_page_prot(unsigned long vm_flags)
74{ 74{
75 return protection_map[vm_flags & 75 return __pgprot(pgprot_val(protection_map[vm_flags &
76 (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; 76 (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
77 pgprot_val(arch_vm_get_page_prot(vm_flags)));
77} 78}
78EXPORT_SYMBOL(vm_get_page_prot); 79EXPORT_SYMBOL(vm_get_page_prot);
79 80
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)
237 end = start + len; 237 end = start + len;
238 if (end <= start) 238 if (end <= start)
239 return -ENOMEM; 239 return -ENOMEM;
240 if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) 240 if (!arch_validate_prot(prot))
241 return -EINVAL; 241 return -EINVAL;
242 242
243 reqprot = prot; 243 reqprot = prot;