summaryrefslogtreecommitdiff
path: root/arch/m68k/include/asm/sun3_pgalloc.h
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-15 02:31:34 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 04:32:17 +0400
commitf84c914b986ed2ec4ffaa5672b423b1f6b65519d (patch)
treec7bbfffe5499be53b9faf6364a5aeb90bf1ffdbb /arch/m68k/include/asm/sun3_pgalloc.h
parent7251ab6b86179f195b3f4b56d57ce9dc7a725409 (diff)
downloadlinux-f84c914b986ed2ec4ffaa5672b423b1f6b65519d.tar.xz
m68k: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/include/asm/sun3_pgalloc.h')
-rw-r--r--arch/m68k/include/asm/sun3_pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/sun3_pgalloc.h b/arch/m68k/include/asm/sun3_pgalloc.h
index 48d80d5a666f..f868506e3350 100644
--- a/arch/m68k/include/asm/sun3_pgalloc.h
+++ b/arch/m68k/include/asm/sun3_pgalloc.h
@@ -59,7 +59,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
return NULL;
clear_highpage(page);
- pgtable_page_ctor(page);
+ if (!pgtable_page_ctor(page)) {
+ __free_page(page);
+ return NULL;
+ }
return page;
}