提交 5db92850 编写于 作者: D Daniel Jacobowitz 提交者: Linus Torvalds

[PATCH] Fix large core dumps with a 32-bit off_t

The ELF core dump code has one use of off_t when writing out segments.
Some of the segments may be passed the 2GB limit of an off_t, even on a
32-bit system, so it's important to use loff_t instead.  This fixes a
corrupted core dump in the bigcore test in GDB's testsuite.
Signed-off-by: NDaniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a2ef79e1
...@@ -1125,7 +1125,7 @@ static int dump_write(struct file *file, const void *addr, int nr) ...@@ -1125,7 +1125,7 @@ static int dump_write(struct file *file, const void *addr, int nr)
return file->f_op->write(file, addr, nr, &file->f_pos) == nr; return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
} }
static int dump_seek(struct file *file, off_t off) static int dump_seek(struct file *file, loff_t off)
{ {
if (file->f_op->llseek) { if (file->f_op->llseek) {
if (file->f_op->llseek(file, off, 0) != off) if (file->f_op->llseek(file, off, 0) != off)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册