summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_aout.c
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 /fs/binfmt_aout.c
parentcdc3d5627d5f7c4e6b6372b9fb39cba0fe6a9b2a (diff)
aout: switch to dump_emit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r--fs/binfmt_aout.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index faaa819f70fa..a4f847f77234 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -45,7 +45,6 @@ static int load_aout_library(struct file*);
45 */ 45 */
46static int aout_core_dump(struct coredump_params *cprm) 46static int aout_core_dump(struct coredump_params *cprm)
47{ 47{
48 struct file *file = cprm->file;
49 mm_segment_t fs; 48 mm_segment_t fs;
50 int has_dumped = 0; 49 int has_dumped = 0;
51 void __user *dump_start; 50 void __user *dump_start;
@@ -85,7 +84,7 @@ static int aout_core_dump(struct coredump_params *cprm)
85 84
86 set_fs(KERNEL_DS); 85 set_fs(KERNEL_DS);
87/* struct user */ 86/* struct user */
88 if (!dump_write(file, &dump, sizeof(dump))) 87 if (!dump_emit(cprm, &dump, sizeof(dump)))
89 goto end_coredump; 88 goto end_coredump;
90/* Now dump all of the user data. Include malloced stuff as well */ 89/* Now dump all of the user data. Include malloced stuff as well */
91 if (!dump_seek(cprm->file, PAGE_SIZE - sizeof(dump))) 90 if (!dump_seek(cprm->file, PAGE_SIZE - sizeof(dump)))
@@ -96,14 +95,14 @@ static int aout_core_dump(struct coredump_params *cprm)
96 if (dump.u_dsize != 0) { 95 if (dump.u_dsize != 0) {
97 dump_start = START_DATA(dump); 96 dump_start = START_DATA(dump);
98 dump_size = dump.u_dsize << PAGE_SHIFT; 97 dump_size = dump.u_dsize << PAGE_SHIFT;
99 if (!dump_write(file, dump_start, dump_size)) 98 if (!dump_emit(cprm, dump_start, dump_size))
100 goto end_coredump; 99 goto end_coredump;
101 } 100 }
102/* Now prepare to dump the stack area */ 101/* Now prepare to dump the stack area */
103 if (dump.u_ssize != 0) { 102 if (dump.u_ssize != 0) {
104 dump_start = START_STACK(dump); 103 dump_start = START_STACK(dump);
105 dump_size = dump.u_ssize << PAGE_SHIFT; 104 dump_size = dump.u_ssize << PAGE_SHIFT;
106 if (!dump_write(file, dump_start, dump_size)) 105 if (!dump_emit(cprm, dump_start, dump_size))
107 goto end_coredump; 106 goto end_coredump;
108 } 107 }
109end_coredump: 108end_coredump: