From d06c038d403af31614fa813ff533dea90168b3f0 Mon Sep 17 00:00:00 2001 From: Alexey Kuznetsov Date: Tue, 8 May 2007 00:31:57 -0700 Subject: [PATCH] --- yaml --- r: 54737 b: refs/heads/master c: b140f25108a8b11aa4903014814988549838b324 h: refs/heads/master i: 54735: 08776572ea0415c2b2f864dc45b13cd0e4e5ca52 v: v3 --- [refs] | 2 +- trunk/fs/binfmt_elf.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index aa23df18a296..356652099ae6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ce0be1273d1473a5a7b57bf0b4995b40c22d6b54 +refs/heads/master: b140f25108a8b11aa4903014814988549838b324 diff --git a/trunk/fs/binfmt_elf.c b/trunk/fs/binfmt_elf.c index 67d9b3148c06..fa8ea33ab0be 100644 --- a/trunk/fs/binfmt_elf.c +++ b/trunk/fs/binfmt_elf.c @@ -871,6 +871,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) elf_prot, elf_flags); if (BAD_ADDR(error)) { send_sig(SIGKILL, current, 0); + retval = IS_ERR((void *)error) ? + PTR_ERR((void*)error) : -EINVAL; goto out_free_dentry; } @@ -900,6 +902,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) TASK_SIZE - elf_ppnt->p_memsz < k) { /* set_brk can never work. Avoid overflows. */ send_sig(SIGKILL, current, 0); + retval = -EINVAL; goto out_free_dentry; }