Commit 9436d5c32b1ac8d4efdbc933611b5e699908854e
1 parent
9489e9dcae
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
um: get_safe_registers() should be done in flush_thread(), not start_thread()
... or we'll end up buggering the results of ELF_PLAT_INIT() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
arch/um/kernel/exec.c
... | ... | @@ -32,13 +32,14 @@ |
32 | 32 | "err = %d\n", ret); |
33 | 33 | force_sig(SIGKILL, current); |
34 | 34 | } |
35 | + get_safe_registers(current_pt_regs()->regs.gp, | |
36 | + current_pt_regs()->regs.fp); | |
35 | 37 | |
36 | 38 | __switch_mm(¤t->mm->context.id); |
37 | 39 | } |
38 | 40 | |
39 | 41 | void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) |
40 | 42 | { |
41 | - get_safe_registers(regs->regs.gp, regs->regs.fp); | |
42 | 43 | PT_REGS_IP(regs) = eip; |
43 | 44 | PT_REGS_SP(regs) = esp; |
44 | 45 | current->ptrace &= ~PT_DTRACE; |