Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull regset conversion fix from Al Viro: "Fix a regression from an unnoticed bisect hazard in the regset series. A bunch of old (aout, originally) primitives used by coredumps became dead code after fdpic conversion to regsets. Removal of that dead code had been the first commit in the followups to regset series; unfortunately, it happened to hide the bisect hazard on sh (extern for fpregs_get() had not been updated in the main series when it should have been; followup simply made fpregs_get() static). And without that followup commit this bisect hazard became breakage in the mainline" Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill unused dump_fpu() instances
This commit is contained in:
@@ -380,55 +380,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* fill in the fpu structure for a core dump.
|
||||
*/
|
||||
int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
|
||||
{
|
||||
if (used_math()) {
|
||||
memset(fpregs, 0, sizeof(*fpregs));
|
||||
fpregs->pr_q_entrysize = 8;
|
||||
return 1;
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
if (test_thread_flag(TIF_USEDFPU)) {
|
||||
put_psr(get_psr() | PSR_EF);
|
||||
fpsave(¤t->thread.float_regs[0], ¤t->thread.fsr,
|
||||
¤t->thread.fpqueue[0], ¤t->thread.fpqdepth);
|
||||
if (regs != NULL) {
|
||||
regs->psr &= ~(PSR_EF);
|
||||
clear_thread_flag(TIF_USEDFPU);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (current == last_task_used_math) {
|
||||
put_psr(get_psr() | PSR_EF);
|
||||
fpsave(¤t->thread.float_regs[0], ¤t->thread.fsr,
|
||||
¤t->thread.fpqueue[0], ¤t->thread.fpqdepth);
|
||||
if (regs != NULL) {
|
||||
regs->psr &= ~(PSR_EF);
|
||||
last_task_used_math = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
memcpy(&fpregs->pr_fr.pr_regs[0],
|
||||
¤t->thread.float_regs[0],
|
||||
(sizeof(unsigned long) * 32));
|
||||
fpregs->pr_fsr = current->thread.fsr;
|
||||
fpregs->pr_qcnt = current->thread.fpqdepth;
|
||||
fpregs->pr_q_entrysize = 8;
|
||||
fpregs->pr_en = 1;
|
||||
if(fpregs->pr_qcnt != 0) {
|
||||
memcpy(&fpregs->pr_q[0],
|
||||
¤t->thread.fpqueue[0],
|
||||
sizeof(struct fpq) * fpregs->pr_qcnt);
|
||||
}
|
||||
/* Zero out the rest. */
|
||||
memset(&fpregs->pr_q[fpregs->pr_qcnt], 0,
|
||||
sizeof(struct fpq) * (32 - fpregs->pr_qcnt));
|
||||
return 1;
|
||||
}
|
||||
|
||||
unsigned long get_wchan(struct task_struct *task)
|
||||
{
|
||||
unsigned long pc, fp, bias = 0;
|
||||
|
Reference in New Issue
Block a user