瀏覽代碼

[PATCH] Fix error recovery path for arch_setup_additional_pages

If arch_setup_additional_pages fails, the error path will do some double-frees.
This fixes it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Roland McGrath 20 年之前
父節點
當前提交
18c8baff8f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/binfmt_elf.c

+ 1 - 1
fs/binfmt_elf.c

@@ -945,7 +945,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
 	retval = arch_setup_additional_pages(bprm, executable_stack);
 	retval = arch_setup_additional_pages(bprm, executable_stack);
 	if (retval < 0) {
 	if (retval < 0) {
 		send_sig(SIGKILL, current, 0);
 		send_sig(SIGKILL, current, 0);
-		goto out_free_dentry;
+		goto out;
 	}
 	}
 #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
 #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */