提交 0da5303b 编写于 作者: K Kirill A. Shutemov 提交者: Linus Torvalds

cris: handle pgtable_page_ctor() fail

Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2cb6182b
...@@ -34,7 +34,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres ...@@ -34,7 +34,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres
pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
if (!pte) if (!pte)
return NULL; return NULL;
pgtable_page_ctor(pte); if (!pgtable_page_ctor(pte)) {
__free_page(pte);
return NULL;
}
return pte; return pte;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册