Skip to contentSkip to conversation

Fix error recovery path for arch_setup_additional_pages

PATCH New Roland McGrath 1 participant 1 message Apr 28, 2005

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

PATCH 1/1 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.

fs/binfmt_elf.c (mode:100644 sha1:4f34e6b2ff6612b6ed59eab7e042852a3f958897) renamed from fs/binfmt_elf.c (mode:100644 sha1:6ae62cbf7c2e5ccd083aaea4648c47a04acb9059) +1 -1
Index: fs/binfmt_elf.c
===================================================================
@@ -945,7 +945,7 @@
 	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 */