diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-13 09:08:47 +0200 |
---|---|---|
committer | Greg Ungerer <gerg@kernel.org> | 2019-06-24 09:16:46 +1000 |
commit | 9ee24b2a38358acbe004640776520a093ac34642 (patch) | |
tree | d0b7b8e313fc6ce1d26fcd5554c9f5ce607fa577 /fs/binfmt_flat.c | |
parent | 4b972a01a7da614b4796475f933094751a295a2f (diff) |
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.c | 2 |
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; |