Re: "elf core dump: fix get_user use" breaks mips compilation

From: Roland McGrath
Date: Mon Feb 16 2009 - 16:25:47 EST


That is either a compiler problem or a problem with how the asm magic used
inside get_user() informs the compiler. The dynamics of the code are not
actually much different than before the change.

I imagine this would work around it:

--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1211,7 +1211,7 @@ static unsigned long vma_dump_size(struc
if (FILTER(ELF_HEADERS) &&
vma->vm_pgoff == 0 && (vma->vm_flags & VM_READ)) {
u32 __user *header = (u32 __user *) vma->vm_start;
- u32 word;
+ u32 word = 0;
mm_segment_t fs = get_fs();
/*
* Doing it this way gets the constant folded by GCC.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/