]> Git Repo - linux.git/commitdiff
cris: handle pgtable_page_ctor() fail
authorKirill A. Shutemov <[email protected]>
Thu, 14 Nov 2013 22:31:29 +0000 (14:31 -0800)
committerLinus Torvalds <[email protected]>
Fri, 15 Nov 2013 00:32:17 +0000 (09:32 +0900)
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Mikael Starvik <[email protected]>
Acked-by: Jesper Nilsson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/cris/include/asm/pgalloc.h

index d9504d38c2765f1ac298cf14b0ab41092226bfa5..235ece437dddc7196be819a8b7b30dc3f26028a5 100644 (file)
@@ -34,7 +34,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres
        pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
        if (!pte)
                return NULL;
-       pgtable_page_ctor(pte);
+       if (!pgtable_page_ctor(pte)) {
+               __free_page(pte);
+               return NULL;
+       }
        return pte;
 }
 
This page took 0.043297 seconds and 4 git commands to generate.