Skip to content

Commit

Permalink
um: get_safe_registers() should be done in flush_thread(), not start_…
Browse files Browse the repository at this point in the history
…thread()

... or we'll end up buggering the results of ELF_PLAT_INIT()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Nov 29, 2012
1 parent 9489e9d commit 9436d5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/um/kernel/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ void flush_thread(void)
"err = %d\n", ret);
force_sig(SIGKILL, current);
}
get_safe_registers(current_pt_regs()->regs.gp,
current_pt_regs()->regs.fp);

__switch_mm(&current->mm->context.id);
}

void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
{
get_safe_registers(regs->regs.gp, regs->regs.fp);
PT_REGS_IP(regs) = eip;
PT_REGS_SP(regs) = esp;
current->ptrace &= ~PT_DTRACE;
Expand Down

0 comments on commit 9436d5c

Please sign in to comment.