]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
m32r: handle pgtable_page_ctor() fail
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 14 Nov 2013 22:31:33 +0000 (14:31 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Nov 2013 00:32:17 +0000 (09:32 +0900)
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/m32r/include/asm/pgalloc.h

index ac4208bcc5ad6d5f05ed75474db11035854de388..2d55a064ccac5ac335e339ce649cf210804842fd 100644 (file)
@@ -45,7 +45,10 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm,
 
        if (!pte)
                return NULL;
-       pgtable_page_ctor(pte);
+       if (!pgtable_page_ctor(pte)) {
+               __free_page(pte);
+               return NULL;
+       }
        return pte;
 }