From: Andrew Morton loff_t != unsigned long Cc: Andi Kleen Signed-off-by: Andrew Morton --- fs/binfmt_elf.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff -puN fs/binfmt_elf.c~support-piping-into-commands-in-proc-sys-kernel-core_pattern-fix fs/binfmt_elf.c --- a/fs/binfmt_elf.c~support-piping-into-commands-in-proc-sys-kernel-core_pattern-fix +++ a/fs/binfmt_elf.c @@ -1218,14 +1218,15 @@ static int notesize(struct memelfnote *e #define DUMP_WRITE(addr, nr, foffset) \ do { if (!dump_write(file, (addr), (nr))) return 0; *foffset += (nr); } while(0) -static int alignfile(struct file *file, unsigned long *foffset) +static int alignfile(struct file *file, loff_t *foffset) { char buf[4] = { 0, }; DUMP_WRITE(buf, roundup(*foffset, 4) - *foffset, foffset); return 1; } -static int writenote(struct memelfnote *men, struct file *file, unsigned long *foffset) +static int writenote(struct memelfnote *men, struct file *file, + loff_t *foffset) { struct elf_note en; en.n_namesz = strlen(men->name) + 1; @@ -1234,9 +1235,11 @@ static int writenote(struct memelfnote * DUMP_WRITE(&en, sizeof(en), foffset); DUMP_WRITE(men->name, en.n_namesz, foffset); - if (!alignfile(file, foffset)) return 0; + if (!alignfile(file, foffset)) + return 0; DUMP_WRITE(men->data, men->datasz, foffset); - if (!alignfile(file, foffset)) return 0; + if (!alignfile(file, foffset)) + return 0; return 1; } _