aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/sun3_pgalloc.h
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 14:31:34 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 09:32:17 +0900
commitf84c914b986ed2ec4ffaa5672b423b1f6b65519d (patch)
treec7bbfffe5499be53b9faf6364a5aeb90bf1ffdbb /arch/m68k/include/asm/sun3_pgalloc.h
parentm32r: handle pgtable_page_ctor() fail (diff)
downloadlinux-dev-f84c914b986ed2ec4ffaa5672b423b1f6b65519d.tar.xz
linux-dev-f84c914b986ed2ec4ffaa5672b423b1f6b65519d.zip
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 '')
-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;
}