diff options
-rw-r--r-- | arch/mips/kernel/irixelf.c | 17 | ||||
-rw-r--r-- | fs/binfmt_elf.c | 4 |
2 files changed, 7 insertions, 14 deletions
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 7ce34d4aa220..10d3644e3608 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c | |||
@@ -1077,8 +1077,8 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
1077 | struct elfhdr elf; | 1077 | struct elfhdr elf; |
1078 | off_t offset = 0, dataoff; | 1078 | off_t offset = 0, dataoff; |
1079 | int limit = current->signal->rlim[RLIMIT_CORE].rlim_cur; | 1079 | int limit = current->signal->rlim[RLIMIT_CORE].rlim_cur; |
1080 | int numnote = 4; | 1080 | int numnote = 3; |
1081 | struct memelfnote notes[4]; | 1081 | struct memelfnote notes[3]; |
1082 | struct elf_prstatus prstatus; /* NT_PRSTATUS */ | 1082 | struct elf_prstatus prstatus; /* NT_PRSTATUS */ |
1083 | elf_fpregset_t fpu; /* NT_PRFPREG */ | 1083 | elf_fpregset_t fpu; /* NT_PRFPREG */ |
1084 | struct elf_prpsinfo psinfo; /* NT_PRPSINFO */ | 1084 | struct elf_prpsinfo psinfo; /* NT_PRPSINFO */ |
@@ -1211,20 +1211,15 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
1211 | } | 1211 | } |
1212 | strlcpy(psinfo.pr_fname, current->comm, sizeof(psinfo.pr_fname)); | 1212 | strlcpy(psinfo.pr_fname, current->comm, sizeof(psinfo.pr_fname)); |
1213 | 1213 | ||
1214 | notes[2].name = "CORE"; | ||
1215 | notes[2].type = NT_TASKSTRUCT; | ||
1216 | notes[2].datasz = sizeof(*current); | ||
1217 | notes[2].data = current; | ||
1218 | |||
1219 | /* Try to dump the FPU. */ | 1214 | /* Try to dump the FPU. */ |
1220 | prstatus.pr_fpvalid = dump_fpu (regs, &fpu); | 1215 | prstatus.pr_fpvalid = dump_fpu (regs, &fpu); |
1221 | if (!prstatus.pr_fpvalid) { | 1216 | if (!prstatus.pr_fpvalid) { |
1222 | numnote--; | 1217 | numnote--; |
1223 | } else { | 1218 | } else { |
1224 | notes[3].name = "CORE"; | 1219 | notes[2].name = "CORE"; |
1225 | notes[3].type = NT_PRFPREG; | 1220 | notes[2].type = NT_PRFPREG; |
1226 | notes[3].datasz = sizeof(fpu); | 1221 | notes[2].datasz = sizeof(fpu); |
1227 | notes[3].data = &fpu; | 1222 | notes[2].data = &fpu; |
1228 | } | 1223 | } |
1229 | 1224 | ||
1230 | /* Write notes phdr entry. */ | 1225 | /* Write notes phdr entry. */ |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 918ccc267e41..6fa6adc40972 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1502,9 +1502,7 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file) | |||
1502 | fill_psinfo(psinfo, current->group_leader, current->mm); | 1502 | fill_psinfo(psinfo, current->group_leader, current->mm); |
1503 | fill_note(notes +1, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); | 1503 | fill_note(notes +1, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); |
1504 | 1504 | ||
1505 | fill_note(notes +2, "CORE", NT_TASKSTRUCT, sizeof(*current), current); | 1505 | numnote = 2; |
1506 | |||
1507 | numnote = 3; | ||
1508 | 1506 | ||
1509 | auxv = (elf_addr_t *) current->mm->saved_auxv; | 1507 | auxv = (elf_addr_t *) current->mm->saved_auxv; |
1510 | 1508 | ||