module: demote invalid ELF header magic error message to pr_debug

This happens anytime busybox modprobe loads a compressed module and
looks especially ugly on postmarketOS for example (or basically any
initramfs); this error is rather pointless since the module is loaded
anyway afterwards.

Upstream (busybox) has no plans to do anything about this error getting
spammed:
https://www.mail-archive.com/busybox@busybox.net/msg27078.html
This commit is contained in:
Jami Kettunen 2021-11-20 22:14:36 +02:00 committed by Jami Kettunen
parent 492379bd16
commit 5bbb19d3d4

View file

@ -1661,7 +1661,7 @@ static int elf_validity_check(struct load_info *info)
}
if (memcmp(info->hdr->e_ident, ELFMAG, SELFMAG) != 0) {
pr_err("Invalid ELF header magic: != %s\n", ELFMAG);
pr_debug("Invalid ELF header magic: != %s\n", ELFMAG);
goto no_exec;
}
if (info->hdr->e_type != ET_REL) {