diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-14 16:27:29 -0700 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-23 13:09:32 +1000 |
commit | c4ea6fcf5a192dbba54666f308bdace1c278e0c1 (patch) | |
tree | 93055c860a9ddfff8e2d056e3ad19730a81b8cb9 | |
parent | 78b58e549a3098a8c1408d0214bd25e5d5e7a3a3 (diff) | |
download | op-kernel-dev-c4ea6fcf5a192dbba54666f308bdace1c278e0c1.zip op-kernel-dev-c4ea6fcf5a192dbba54666f308bdace1c278e0c1.tar.gz |
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>
-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 f5e9491..e6daf9a 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)) { |