diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-23 11:53:03 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-23 11:53:03 +0200 |
commit | 009b9fc98ddd83f9139fdabb12c0d7a8535d5421 (patch) | |
tree | f7d3e182407d2ebe50a9b8db6361ac910027a1cf /mm/mprotect.c | |
parent | 3711ccb07b7f0a13f4f1aa16a8fdca9c930f21ca (diff) | |
parent | 481c5346d0981940ee63037eb53e4e37b0735c10 (diff) |
Merge branch 'linus' into x86/threadinfotip-x86-threadinfo-2008-06-23_09.53_Mon
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index 4de546899dc1..a5bf31c27375 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -26,6 +26,13 @@ #include <asm/cacheflush.h> #include <asm/tlbflush.h> +#ifndef pgprot_modify +static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) +{ + return newprot; +} +#endif + static void change_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr, unsigned long end, pgprot_t newprot, int dirty_accountable) @@ -192,7 +199,9 @@ success: * held in write mode. */ vma->vm_flags = newflags; - vma->vm_page_prot = vm_get_page_prot(newflags); + vma->vm_page_prot = pgprot_modify(vma->vm_page_prot, + vm_get_page_prot(newflags)); + if (vma_wants_writenotify(vma)) { vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED); dirty_accountable = 1; |