Commit cfc46ca4 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Kees Cook
Browse files

binfmt_elf: fix documented return value for load_elf_phdrs()



This function has never returned anything but a plain NULL.

Fixes: 6a8d3894 ("binfmt_elf: Hoist ELF program header loading to a function")
Signed-off-by: default avatarRolf Eike Beer <eb@emlix.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/2359389.EDbqzprbEW@mobilepool36.emlix.com
parent bfb4a2b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -456,7 +456,7 @@ static unsigned long maximum_alignment(struct elf_phdr *cmds, int nr)
 *
 *
 * Loads ELF program headers from the binary file elf_file, which has the ELF
 * Loads ELF program headers from the binary file elf_file, which has the ELF
 * header pointed to by elf_ex, into a newly allocated array. The caller is
 * header pointed to by elf_ex, into a newly allocated array. The caller is
 * responsible for freeing the allocated data. Returns an ERR_PTR upon failure.
 * responsible for freeing the allocated data. Returns NULL upon failure.
 */
 */
static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex,
static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex,
				       struct file *elf_file)
				       struct file *elf_file)