Skip to content

Commit

Permalink
[PATCH] Fix error recovery path for arch_setup_additional_pages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Apr 28, 2005
1 parent 5bec003 commit 18c8baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (retval < 0) {
send_sig(SIGKILL, current, 0);
goto out_free_dentry;
goto out;
}
#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */

Expand Down

0 comments on commit 18c8baf

Please sign in to comment.