]> err.no Git - linux-2.6/commitdiff
module loading ELF handling: use SELFMAG instead of numeric constant
authorCyrill Gorcunov <gorcunov@gmail.com>
Wed, 14 May 2008 23:27:29 +0000 (16:27 -0700)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 23 May 2008 03:09:32 +0000 (13:09 +1000)
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>
kernel/module.c

index f5e9491ef7ac2ed9d9473ded84c37f5018ed722c..e6daf9a320a796648c6b71178a29b25fa48f8815 100644 (file)
@@ -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)) {