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

index 8c00785c60d5b2517dd83c3b75b7ac50b0d10e1d..a33673b3687df2fa1e76022635cc3961a60810c5 100644 (file)
@@ -47,7 +47,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
        if (!pg)
                return NULL;
        page = virt_to_page(pg);
-       pgtable_page_ctor(page);
+       if (!pgtable_page_ctor(page)) {
+               quicklist_free(QUICK_PT, NULL, pg);
+               return NULL;
+       }
        return page;
 }