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: 2.1b_release~18684^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4ea6fcf5a192dbba54666f308bdace1c278e0c1;p=platform%2Fkernel%2Fkernel-mfld-blackbay.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 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)) {