Clean up load_elf_binary unwind code (2) Jump to unwind code instead of cleaning up by hand in load_elf_binary. This is only correct in combination with load_elf_binary-unwind1.diff. Index: linux-2.4.22-rc2.orig/fs/binfmt_elf.c =================================================================== --- linux-2.4.22-rc2.orig.orig/fs/binfmt_elf.c 2003-08-09 01:50:50.000000000 +0200 +++ linux-2.4.22-rc2.orig/fs/binfmt_elf.c 2003-08-09 01:46:40.000000000 +0200 @@ -715,18 +715,16 @@ static int load_elf_binary(struct linux_ elf_entry = load_elf_interp(&interp_elf_ex, interpreter, &interp_load_addr); - - allow_write_access(interpreter); - fput(interpreter); - kfree(elf_interpreter); - if (BAD_ADDR(elf_entry)) { printk(KERN_ERR "Unable to load interpreter\n"); - kfree(elf_phdata); send_sig(SIGSEGV, current, 0); retval = -ENOEXEC; /* Nobody gets to see this, but.. */ - goto out; + goto out_free_dentry; } + + allow_write_access(interpreter); + fput(interpreter); + kfree(elf_interpreter); } kfree(elf_phdata);