]>
Commit | Line | Data |
---|---|---|
c5ac8acd GKH |
1 | From 2b1d3ae940acd11be44c6eced5873d47c2e00ffa Mon Sep 17 00:00:00 2001 |
2 | From: Andrew Morton <akpm@linux-foundation.org> | |
3 | Date: Thu, 28 May 2015 15:44:24 -0700 | |
4 | Subject: fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings | |
5 | ||
6 | From: Andrew Morton <akpm@linux-foundation.org> | |
7 | ||
8 | commit 2b1d3ae940acd11be44c6eced5873d47c2e00ffa upstream. | |
9 | ||
10 | load_elf_binary() returns `retval', not `error'. | |
11 | ||
12 | Fixes: a87938b2e246b81b4fb ("fs/binfmt_elf.c: fix bug in loading of PIE binaries") | |
13 | Reported-by: James Hogan <james.hogan@imgtec.com> | |
14 | Cc: Michael Davidson <md@google.com> | |
15 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | |
16 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | ||
19 | --- | |
20 | fs/binfmt_elf.c | 2 +- | |
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
22 | ||
23 | --- a/fs/binfmt_elf.c | |
24 | +++ b/fs/binfmt_elf.c | |
25 | @@ -819,7 +819,7 @@ static int load_elf_binary(struct linux_ | |
26 | total_size = total_mapping_size(elf_phdata, | |
27 | loc->elf_ex.e_phnum); | |
28 | if (!total_size) { | |
29 | - error = -EINVAL; | |
30 | + retval = -EINVAL; | |
31 | goto out_free_dentry; | |
32 | } | |
33 | } |