modprobe: load modules with grab_elf_file_fd()
authorAndreas Robinson <andr345@gmail.com>
Thu, 14 May 2009 12:07:37 +0000 (14:07 +0200)
committerAndreas Robinson <andr345@gmail.com>
Fri, 15 May 2009 13:01:32 +0000 (15:01 +0200)
commit7ffd0170469019b8feafd82b02f7902f9602142c
tree6bea5627239fe8e00f92f8441e2a3a3f77b036f4
parent39e63afd9d179b03b84f27eb9cfe8d6dd7c2ba7f
modprobe: load modules with grab_elf_file_fd()

In the old implementation, the loader didn't care about whether
a file is an ELF-file or not, and let init_module() sort it out.

In the new implementation, the loading fails with errno = ENOEXEC
if the file isn't an ELF-file.

However, the new logic does not pass the testing, specifically
test-modprobe/10alias.sh. To work around this, the commit adds a
hack that replicates the old way, when grab_elf_file_fd() does
return errno = ENOEXEC.

Obviously, this needs to be fixed. To replicate the problem,
simply remove the hack.

Signed-off-by: Andreas Robinson <andr345@gmail.com>
modprobe.c