summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-04-25 22:09:09 +0100
committerBen Hutchings <ben@decadent.org.uk>2019-05-02 21:42:06 +0100
commitc54cc234b4732355629baccac945c863c8a8684e (patch)
tree6b7f71da6403cb06372644d2b89c9ac7573ef51f /fs
parent52b1af5e74cc3f4d513eacf49f71d9855a9ccbec (diff)
binfmt_elf: Fix missing SIGKILL for empty PIE
Commit ea08dc5191d9 "fs/binfmt_elf.c: fix bug in loading of PIE binaries", which was a backport of commit a87938b2e246 upstream, added a new failure path to load_elf_binary(). Before commit 19d860a140be "handle suicide on late failure exits in execve() in search_binary_handler()", load_elf_binary() wass responsible for sending a fatal signal to the task in case of an error after flushing the old executable. Add that to the new failure path. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 972db0c5350d..9701f6797a64 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -822,6 +822,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
total_size = total_mapping_size(elf_phdata,
loc->elf_ex.e_phnum);
if (!total_size) {
+ send_sig(SIGKILL, current, 0);
retval = -EINVAL;
goto out_free_dentry;
}