summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-05-15 01:27:29 +0200
committerRusty Russell <rusty@rustcorp.com.au>2008-05-23 05:09:32 +0200
commitc4ea6fcf5a192dbba54666f308bdace1c278e0c1 (patch)
tree93055c860a9ddfff8e2d056e3ad19730a81b8cb9 /kernel/module.c
parentHTC_EGPIO is ARM-only (diff)
downloadlinux-c4ea6fcf5a192dbba54666f308bdace1c278e0c1.tar.xz
linux-c4ea6fcf5a192dbba54666f308bdace1c278e0c1.zip
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)) {