Skip to content

Commit

Permalink
module loading ELF handling: use SELFMAG instead of numeric constant
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cyrillos authored and rustyrussell committed May 23, 2008
1 parent 78b58e5 commit c4ea6fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit c4ea6fc

Please sign in to comment.