Skip to contentSkip to conversation

elf-dont-free-interpreters-elf-pheaders-on-common-path.patch removed from -mm tree

merged [email protected] 1 participant 1 message Apr 8, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: fs/binfmt_elf.c: don't free interpreter's ELF pheaders on common path
has been removed from the -mm tree. Its filename was
elf-dont-free-interpreters-elf-pheaders-on-common-path.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Alexey Dobriyan <[email protected]>
Subject: fs/binfmt_elf.c: don't free interpreter's ELF pheaders on common path

Static executables don't need to free NULL pointer.

It doesn't matter really because static executable is not common scenario but do it anyway out of pedantry.

---

 fs/binfmt_elf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/binfmt_elf.c renamed from fs/binfmt_elf.c~elf-dont-free-interpreters-elf-pheaders-on-common-path +1 -1
@@ -1076,6 +1076,7 @@ out_free_interp:
 		fput(interpreter);
 
 		kfree(interp_elf_ex);
+		kfree(interp_elf_phdata);
 	} else {
 		elf_entry = e_entry;
 		if (BAD_ADDR(elf_entry)) {
@@ -1084,7 +1085,6 @@ out_free_interp:
 		}
 	}
 
-	kfree(interp_elf_phdata);
 	kfree(elf_phdata);
 
 	set_binfmt(&elf_format);

_

Patches currently in -mm which might be from [email protected] are

ramfs-support-o_tmpfile.patch