diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index fd5b2ea..13b0845 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1096,6 +1096,8 @@ static int dump_write(struct file *file, const void *addr, int nr)
static int dump_seek(struct file *file, loff_t off)
{
+ int ret = 1;
+
if (file->f_op->llseek && file->f_op->llseek != no_llseek) {
if (file->f_op->llseek(file, off, SEEK_CUR) < 0)
return 0;
@@ -1107,13 +1109,15 @@ static int dump_seek(struct file *file, loff_t off)
unsigned long n = off;
if (n > PAGE_SIZE)
n = PAGE_SIZE;
- if (!dump_write(file, buf, n))
- return 0;
+ if (!dump_write(file, buf, n)) {
+ ret = 0;
+ break;
+ }
off -= n;
}
free_page((unsigned long)buf);
}
- return 1;
+ return ret;
}
/*
--
1.7.0.94.gf7311
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
> Signed-off-by: Andr__ Goddard Rosa <andre....@gmail.com>
Please don't send unchangelogged patches.
Explain the leak.
Explain the user impact (ie: how it is triggered).
Explain how the patch fixes it.
Thanks.
Hi Andre,
plus, can you please rebase this patch onto -mmotm tree? it have lots elf core dump related
fix and it is going to be merged at this merge window, maybe.
I think your patch is correct. but I hope to avoid patch confliction.
>> Please don't send unchangelogged patches.
>>
>> Explain the leak.
>>
>> Explain the user impact (ie: how it is triggered).
>>
>> Explain how the patch fixes it.
>>
>> Thanks.
>
> Hi Andre,
>
> plus, can you please rebase this patch onto -mmotm tree? it have lots elf core dump related
> fix and it is going to be merged at this merge window, maybe.
>
> I think your patch is correct. but I hope to avoid patch confliction.
>
> Thanks.
>
Sure, I'm going to include a proper changelog, rebase it on top of
-mmotm tree and send a new patch soon.
Thank you,
Andr�