Subject: [merged] mm-mremapc-call-pud_free-after-fail-calling-pmd_alloc.patch removed from -mm tree To: gang.chen@xxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 12 Sep 2013 12:45:09 -0700 The patch titled Subject: mm/mremap.c: call pud_free() after fail calling pmd_alloc() has been removed from the -mm tree. Its filename was mm-mremapc-call-pud_free-after-fail-calling-pmd_alloc.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Chen Gang <gang.chen@xxxxxxxxxxx> Subject: mm/mremap.c: call pud_free() after fail calling pmd_alloc() In alloc_new_pmd(), if pud_alloc() was called successfully, but pmd_alloc() fails, avoid leaking `pud'. Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mremap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN mm/mremap.c~mm-mremapc-call-pud_free-after-fail-calling-pmd_alloc mm/mremap.c --- a/mm/mremap.c~mm-mremapc-call-pud_free-after-fail-calling-pmd_alloc +++ a/mm/mremap.c @@ -25,6 +25,7 @@ #include <asm/uaccess.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> +#include <asm/pgalloc.h> #include "internal.h" @@ -62,8 +63,10 @@ static pmd_t *alloc_new_pmd(struct mm_st return NULL; pmd = pmd_alloc(mm, pud, addr); - if (!pmd) + if (!pmd) { + pud_free(mm, pud); return NULL; + } VM_BUG_ON(pmd_trans_huge(*pmd)); _ Patches currently in -mm which might be from gang.chen@xxxxxxxxxxx are origin.patch sh64-kernel-use-usp-instead-of-fn.patch sh64-kernel-remove-useless-variable-regs.patch include-linux-interrupth-add-dummy-irq_set_irq_wake-for-generic_hardirqs.patch h8300-kernel-timer-timer8c-add-missing-semicolon.patch mm-kconfig-add-mmu-dependency-for-migration.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