diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-14 16:27:29 -0700 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-05-20 11:00:29 +1000 |
commit | 1b0a04e9a6b524dde176b50965786d7458efc8c0 (patch) | |
tree | f5a26ffd229f0885bb96bfd3c9e5f89e89c51709 /kernel | |
parent | b8291ad07a7f3b5b990900f0001198ac23ba893e (diff) |
module loading ELF handling: use SELFMAG instead of numeric constant
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index f5e9491ef7ac..e6daf9a320a7 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1780,7 +1780,7 @@ static struct module *load_module(void __user *umod, /* Sanity checks against insmoding binaries or wrong arch, weird elf version */ - if (memcmp(hdr->e_ident, ELFMAG, 4) != 0 + if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 || hdr->e_type != ET_REL || !elf_check_arch(hdr) || hdr->e_shentsize != sizeof(*sechdrs)) { |