The patch titled fs/binfmt_elf.c: fix a wrong free has been removed from the -mm tree. Its filename was fs-binfmt_elfc-fix-a-wrong-free.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: fs/binfmt_elf.c: fix a wrong free From: WANG Cong <xiyou.wangcong@xxxxxxxxx> On the kmalloc failure path we shouldn't free pointers in 'info', because the struct 'info' is uninitialized when kmalloc is called. And when kmalloc returns NULL, it's needless to kfree it. Signed-off-by: WANG Cong <wangcong@xxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Reviewed-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/binfmt_elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -puN fs/binfmt_elf.c~fs-binfmt_elfc-fix-a-wrong-free fs/binfmt_elf.c --- a/fs/binfmt_elf.c~fs-binfmt_elfc-fix-a-wrong-free +++ a/fs/binfmt_elf.c @@ -1900,7 +1900,7 @@ static int elf_core_dump(long signr, str /* alloc memory for large data structures: too large to be on stack */ elf = kmalloc(sizeof(*elf), GFP_KERNEL); if (!elf) - goto cleanup; + goto out; segs = current->mm->map_count; #ifdef ELF_CORE_EXTRA_PHDRS @@ -2034,8 +2034,9 @@ end_coredump: set_fs(fs); cleanup: - kfree(elf); free_note_info(&info); + kfree(elf); +out: return has_dumped; } _ Patches currently in -mm which might be from xiyou.wangcong@xxxxxxxxx are uml-redo-host-capability-detection-and-disabling.patch uml-style-fixes.patch uml-hppfs-fixes.patch uml-move-hppfs_kernc-to-hppfsc.patch uml-tidy-ptrace-interface.patch uml-fix-errno-return.patch uml-fix-build-when-slob-is-enabled.patch uml-remove-unused-header.patch uml-fix-bad-ntp-interaction-with-clock.patch uml-use-__spin_lock_unlocked.patch uml-fix-config_raw-dependencies.patch uml-use-div_round_up.patch uml-use-page_size-in-linker-scripts.patch uml-physical-memory-shouldnt-include-initial-stack.patch cpumask-remove-bitmap_scnprintf_len-and-cpumask_scnprintf_len.patch linux-next.patch arch-um-kernel-irqc-clean-up-some-functions.patch arch-um-kernel-memc-remove-arch_validate.patch uml-make-several-more-things-static.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