Skip to contentSkip to conversation

elf: fixup error path in PT_INTERP case

PATCH New Alexey Dobriyan 1 participant 1 message Mar 30, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 elf: fixup error path in PT_INTERP case

Fix broken error path if PT_INTERP filename can't be opened for execution.

---

fold into elf-free-pt_interp-filename-asap.patch

 fs/binfmt_elf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/binfmt_elf.c +1 -1
@@ -777,7 +777,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
 			kfree(elf_interpreter);
 			retval = PTR_ERR(interpreter);
 			if (IS_ERR(interpreter))
-				goto out_free_dentry;
+				goto out_free_ph;
 
 			/*
 			 * If the binary is not readable then enforce