Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /mm/mprotect.c

Filename:/mm/mprotect.c
Lines Added:2
Lines Deleted:5
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.26-rc2-git4  2.6.26-rc2-git5  2.6.26-rc3  2.6.26-rc4  2.6.26-rc5  2.6.26-rc6 

Location
[  2.6.24
  [  mm
     o  mprotect.c

Patch

diff --git a/mm/mprotect.c b/mm/mprotect.c
index e8346c3..4de5468 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -53,7 +53,6 @@ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd,
          if (dirty_accountable && pte_dirty(ptent))
             ptent = pte_mkwrite(ptent);
          set_pte_at(mm, addr, pte, ptent);
-         lazy_mmu_prot_update(ptent);
 #ifdef CONFIG_MIGRATION
       } else if (!pte_file(oldpte)) {
          swp_entry_t entry = pte_to_swp_entry(oldpte);
@@ -193,11 +192,9 @@ success:
     * held in write mode.
     */
    vma->vm_flags = newflags;
-   vma->vm_page_prot = protection_map[newflags &
-      (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
+   vma->vm_page_prot = vm_get_page_prot(newflags);
    if (vma_wants_writenotify(vma)) {
-      vma->vm_page_prot = protection_map[newflags &
-         (VM_READ|VM_WRITE|VM_EXEC)];
+      vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
       dirty_accountable = 1;
    }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.