summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-07 12:09:40 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-11-08 19:17:50 +1100
commit24b9c76d3d19c205bed6e8c227bc33cb0af853b0 (patch)
tree62625657a4cfa90c928bf4b226edd66066f5f058
parent88e1d285fa89e0d992156bf592122ea65815d4cf (diff)
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>
-rw-r--r--arch/sh/include/asm/pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h
index 8c00785c60d5..a33673b3687d 100644
--- a/arch/sh/include/asm/pgalloc.h
+++ b/arch/sh/include/asm/pgalloc.h
@@ -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;
}