summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-05-14 16:27:29 -0700
committerRusty Russell <rusty@rustcorp.com.au>2008-05-23 13:09:32 +1000
commitc4ea6fcf5a192dbba54666f308bdace1c278e0c1 (patch)
tree93055c860a9ddfff8e2d056e3ad19730a81b8cb9 /kernel/module.c
parent78b58e549a3098a8c1408d0214bd25e5d5e7a3a3 (diff)
downloadlinux-c4ea6fcf5a192dbba54666f308bdace1c278e0c1.tar.bz2
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/module.c')
-rw-r--r--kernel/module.c2
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)) {