diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-01 03:30:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-02 05:22:52 -0700 |
commit | 2678fefedbbc03a3ae6f5c254791bf147d6c52fd (patch) | |
tree | 23052dffe4591f06192b8ee9cd17a1160fe4520f /arch/sparc64/kernel/process.c | |
parent | 32039f4954938e4d761032d7046254d08d0db54c (diff) |
sparc64: Fix syscall restart, for real...
The change I put into copy_thread() just papered over the real
problem.
When we are looking to see if we should do a syscall restart, when
deliverying a signal, we should only interpret the syscall return
value as an error if the carry condition code(s) are set.
Otherwise it's a success return.
Also, sigreturn paths should do a pt_regs_clear_trap_type().
It turns out that doing a syscall restart when returning from a fork()
does and should happen, from time to time. Even if copy_thread()
returns success, copy_process() can still unwind and signal
-ERESTARTNOINTR in the parent.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/process.c')
-rw-r--r-- | arch/sparc64/kernel/process.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 056013749157..500ac6d483a0 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -591,12 +591,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, if (clone_flags & CLONE_SETTLS) t->kregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3]; - /* We do not want to accidently trigger system call restart - * handling in the new thread. Therefore, clear out the trap - * type, which will make pt_regs_regs_is_syscall() return false. - */ - pt_regs_clear_trap_type(t->kregs); - return 0; } |