Commit d6d29b7d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] binfmt_elf build fix

The cast to void still triggers the gcc "warning: ignoring return value"
warning, which is dumb of it.  So ignore the return value differently.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 10d25b76
......@@ -803,13 +803,14 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
nbyte = ELF_MIN_ALIGN - nbyte;
if (nbyte > elf_brk - elf_bss)
nbyte = elf_brk - elf_bss;
/*
* This bss-zeroing can fail if the ELF file
* specifies odd protections. So we don't check
* the return value
*/
(void)clear_user((void __user *)elf_bss +
load_bias, nbyte);
if (clear_user((void __user *)elf_bss +
load_bias, nbyte)) {
/*
* This bss-zeroing can fail if the ELF
* file specifies odd protections. So
* we don't check the return value
*/
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment