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

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

Advertisement

Kernel v2.6.26-rc1-git9 /mm/memory.c

Filename:/mm/memory.c
Lines Added:4
Lines Deleted:1
Also changed in: (Previous) 2.6.26-rc1-git8  2.6.26-rc1-git7  2.6.26-rc1-git6  2.6.26-rc1-git5  2.6.26-rc1  2.6.25-git20 
(Following) 2.6.26-rc2  2.6.26-rc2-git4  2.6.26-rc2-git5  2.6.26-rc3  2.6.26-rc3-git7  2.6.26-rc3-git8 

Location
[  2.6.26-rc1-git9
  [  mm
     o  memory.c

Patch

diff --git a/mm/memory.c b/mm/memory.c
index bbab1e3..48c122d 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -969,7 +969,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
       goto no_page_table;
    
    pmd = pmd_offset(pud, address);
-   if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
+   if (pmd_none(*pmd))
       goto no_page_table;
 
    if (pmd_huge(*pmd)) {
@@ -978,6 +978,9 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
       goto out;
    }
 
+   if (unlikely(pmd_bad(*pmd)))
+      goto no_page_table;
+
    ptep = pte_offset_map_lock(mm, pmd, address, &ptl);
    if (!ptep)
       goto out;


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