summaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-10-07 07:22:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:25 -0500
commit43a5d548eb5949580c1d96b9f3fa9f4c0bee0b98 (patch)
treec93a2339c6067096d419feac2260e89baf8d4f3c /arch/x86/ia32
parentcdc3d5627d5f7c4e6b6372b9fb39cba0fe6a9b2a (diff)
downloadlinux-stable-43a5d548eb5949580c1d96b9f3fa9f4c0bee0b98.tar.gz
linux-stable-43a5d548eb5949580c1d96b9f3fa9f4c0bee0b98.tar.bz2
linux-stable-43a5d548eb5949580c1d96b9f3fa9f4c0bee0b98.zip
aout: switch to dump_emit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32_aout.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
index 80361c00fb64..9e26e9e85576 100644
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -133,14 +133,6 @@ static void set_brk(unsigned long start, unsigned long end)
#include <linux/coredump.h>
-#define DUMP_WRITE(addr, nr) \
- if (!dump_write(cprm->file, (void *)(addr), (nr))) \
- goto end_coredump;
-
-#define DUMP_SEEK(offset) \
- if (!dump_seek(cprm->file, offset)) \
- goto end_coredump;
-
#define START_DATA(u) (u.u_tsize << PAGE_SHIFT)
#define START_STACK(u) (u.start_stack)
@@ -192,22 +184,26 @@ static int aout_core_dump(struct coredump_params *cprm)
set_fs(KERNEL_DS);
/* struct user */
- DUMP_WRITE(&dump, sizeof(dump));
+ if (!dump_emit(cprm, &dump, sizeof(dump)))
+ goto end_coredump;
/* Now dump all of the user data. Include malloced stuff as well */
- DUMP_SEEK(PAGE_SIZE - sizeof(dump));
+ if (!dump_seek(cprm->file, PAGE_SIZE - sizeof(dump)))
+ goto end_coredump;
/* now we start writing out the user space info */
set_fs(USER_DS);
/* Dump the data area */
if (dump.u_dsize != 0) {
dump_start = START_DATA(dump);
dump_size = dump.u_dsize << PAGE_SHIFT;
- DUMP_WRITE(dump_start, dump_size);
+ if (!dump_emit(cprm, (void *)dump_start, dump_size))
+ goto end_coredump;
}
/* Now prepare to dump the stack area */
if (dump.u_ssize != 0) {
dump_start = START_STACK(dump);
dump_size = dump.u_ssize << PAGE_SHIFT;
- DUMP_WRITE(dump_start, dump_size);
+ if (!dump_emit(cprm, (void *)dump_start, dump_size))
+ goto end_coredump;
}
end_coredump:
set_fs(fs);