From 9ee24b2a38358acbe004640776520a093ac34642 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 13 Jun 2019 09:08:47 +0200 Subject: 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 Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer --- fs/binfmt_flat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/binfmt_flat.c') 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; -- cgit v1.2.3-55-g7522