aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/binfmt_flat.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-13 09:08:47 +0200
committerGreg Ungerer <gerg@kernel.org>2019-06-24 09:16:46 +1000
commit9ee24b2a38358acbe004640776520a093ac34642 (patch)
treed0b7b8e313fc6ce1d26fcd5554c9f5ce607fa577 /fs/binfmt_flat.c
parentLinux 5.2-rc6 (diff)
downloadwireguard-linux-9ee24b2a38358acbe004640776520a093ac34642.tar.xz
wireguard-linux-9ee24b2a38358acbe004640776520a093ac34642.zip
binfmt_flat: remove flat_reloc_valid
This helper is the same for all architectures, open code it in the only caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r--fs/binfmt_flat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 82a48e830018..afddea583999 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -345,7 +345,7 @@ calc_reloc(unsigned long r, struct lib_info *p, int curid, int internalp)
start_code = p->lib_list[id].start_code;
text_len = p->lib_list[id].text_len;
- if (!flat_reloc_valid(r, start_brk - start_data + text_len)) {
+ if (r > start_brk - start_data + text_len) {
pr_err("reloc outside program 0x%lx (0 - 0x%lx/0x%lx)",
r, start_brk-start_data+text_len, text_len);
goto failed;