Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: handle pgtable_page_ctor() fail

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>

authored by

Kirill A. Shutemov and committed by
Linus Torvalds
478cf8ca 96da3a62

+4 -1
+4 -1
arch/sh/include/asm/pgalloc.h
··· 47 47 if (!pg) 48 48 return NULL; 49 49 page = virt_to_page(pg); 50 - pgtable_page_ctor(page); 50 + if (!pgtable_page_ctor(page)) { 51 + quicklist_free(QUICK_PT, NULL, pg); 52 + return NULL; 53 + } 51 54 return page; 52 55 } 53 56