Subject: [merged] sparc-handle-pgtable_page_ctor-fail.patch removed from -mm tree To: kirill.shutemov@xxxxxxxxxxxxxxx,davem@xxxxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 15 Nov 2013 12:08:32 -0800 The patch titled Subject: sparc: handle pgtable_page_ctor() fail has been removed from the -mm tree. Its filename was sparc-handle-pgtable_page_ctor-fail.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Subject: sparc: handle pgtable_page_ctor() fail Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Acked-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sparc/mm/init_64.c | 11 ++++++----- arch/sparc/mm/srmmu.c | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff -puN arch/sparc/mm/init_64.c~sparc-handle-pgtable_page_ctor-fail arch/sparc/mm/init_64.c --- a/arch/sparc/mm/init_64.c~sparc-handle-pgtable_page_ctor-fail +++ a/arch/sparc/mm/init_64.c @@ -2519,12 +2519,13 @@ pgtable_t pte_alloc_one(struct mm_struct return pte; page = __alloc_for_cache(mm); - if (page) { - pgtable_page_ctor(page); - pte = (pte_t *) page_address(page); + if (!page) + return NULL; + if (!pgtable_page_ctor(page)) { + free_hot_cold_page(page, 0); + return NULL; } - - return pte; + return (pte_t *) page_address(page); } void pte_free_kernel(struct mm_struct *mm, pte_t *pte) diff -puN arch/sparc/mm/srmmu.c~sparc-handle-pgtable_page_ctor-fail arch/sparc/mm/srmmu.c --- a/arch/sparc/mm/srmmu.c~sparc-handle-pgtable_page_ctor-fail +++ a/arch/sparc/mm/srmmu.c @@ -345,7 +345,10 @@ pgtable_t pte_alloc_one(struct mm_struct if ((pte = (unsigned long)pte_alloc_one_kernel(mm, address)) == 0) return NULL; page = pfn_to_page(__nocache_pa(pte) >> PAGE_SHIFT); - pgtable_page_ctor(page); + if (!pgtable_page_ctor(page)) { + __free_page(page); + return NULL; + } return page; } _ Patches currently in -mm which might be from kirill.shutemov@xxxxxxxxxxxxxxx are origin.patch x86-mm-get-aslr-work-for-hugetlb-mappings.patch mm-drop-actor-argument-of-do_generic_file_read-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html