summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf_fdpic.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-10-08 09:26:08 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:26 -0500
commit9b56d54380adb5fef71f687109bbd6f8413d694f (patch)
tree006cd31736372a9f7c9d4e6d7b99a8dd1748d49a /fs/binfmt_elf_fdpic.c
parent2507a4fbd48a96bc4236e584252635f8539079df (diff)
downloadlinux-stable-9b56d54380adb5fef71f687109bbd6f8413d694f.tar.gz
linux-stable-9b56d54380adb5fef71f687109bbd6f8413d694f.tar.bz2
linux-stable-9b56d54380adb5fef71f687109bbd6f8413d694f.zip
dump_skip(): dump_seek() replacement taking coredump_params
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r--fs/binfmt_elf_fdpic.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 70e299917898..a69fc4ae1c85 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1509,7 +1509,7 @@ static bool elf_fdpic_dump_segments(struct coredump_params *cprm)
kunmap(page);
page_cache_release(page);
} else {
- res = dump_seek(file, PAGE_SIZE);
+ res = dump_skip(cprm, PAGE_SIZE);
}
if (!res)
return false;
@@ -1547,11 +1547,10 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
int has_dumped = 0;
mm_segment_t fs;
int segs;
- size_t size = 0;
int i;
struct vm_area_struct *vma;
struct elfhdr *elf = NULL;
- loff_t offset = 0, dataoff, foffset;
+ loff_t offset = 0, dataoff;
int numnote;
struct memelfnote *notes = NULL;
struct elf_prstatus *prstatus = NULL; /* NT_PRSTATUS */
@@ -1682,7 +1681,6 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
offset += sizeof(*elf); /* Elf header */
offset += segs * sizeof(struct elf_phdr); /* Program headers */
- foffset = offset;
/* Write notes phdr entry */
{
@@ -1751,8 +1749,6 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
if (!elf_core_write_extra_phdrs(cprm, offset))
goto end_coredump;
- size = cprm->written;
- cprm->written = foffset;
/* write out the notes section */
for (i = 0; i < numnote; i++)
if (!writenote(notes + i, cprm))
@@ -1768,10 +1764,9 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
goto end_coredump;
}
- if (!dump_seek(cprm->file, dataoff - cprm->written))
+ if (!dump_skip(cprm, dataoff - cprm->written))
goto end_coredump;
- cprm->written = size;
if (!elf_fdpic_dump_segments(cprm))
goto end_coredump;