From: Cyrill Gorcunov Date: Wed, 14 May 2008 23:27:29 +0000 (-0700) Subject: module loading ELF handling: use SELFMAG instead of numeric constant X-Git-Tag: v2.6.26-rc4~63^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c4ea6fcf5a192dbba54666f308bdace1c278e0c1;p=linux-2.6-omap-h63xx.git module loading ELF handling: use SELFMAG instead of numeric constant Signed-off-by: Cyrill Gorcunov Signed-off-by: Andrew Morton Signed-off-by: Rusty Russell --- diff --git a/kernel/module.c b/kernel/module.c index f5e9491ef7a..e6daf9a320a 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)) {