Skip to content
Commit a989ff89 authored by Al Viro's avatar Al Viro Committed by Ralf Baechle
Browse files

MIPS: Don't stomp on caller's ->regs[2] in copy_thread()



We never needed that (->regs[2] is overwritten on return from syscall paths
with return value of syscall, so storing it there early made no sense) and
with new restart logics since d27240bf7e61d2656de18e158ec910a902030847 it
has become really bad - we lose the original syscall number before the
place where we decide that we might need a syscall restart.

Note that for child we do need the assignment to regs[2] - it won't go
through the normal return from syscall path.

[Ralf: Issue found and reported by Lluís; initial investigations by me;
bug finally found and patch by Al; testing by me and Lluís.]

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Tested-by: default avatarLluís Batlle i Rossell <viriketo@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 2b3e5023
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment