diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-19 17:48:50 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-07-28 11:11:52 +0100 |
commit | 6628521784d1da3b7354c6b6e8499e19ab46a3d1 (patch) | |
tree | cde8876156ebe9999bdc2156f76d18b15293c754 /arch/arm/kernel/signal.c | |
parent | 81783786d5cf4aa0d3e15bb0fac856aa8ebf1a76 (diff) |
ARM: 7474/1: get rid of TIF_SYSCALL_RESTARTSYS
just let do_work_pending() return 1 on normal local restarts and
-1 on those that had been caused by ERESTART_RESTARTBLOCK (and 0
is still "all done, sod off to userland now"). And let the asm
glue flip scno to restart_syscall(2) one if it got negative from
us...
[will: resolved conflicts with audit fixes]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/signal.c')
-rw-r--r-- | arch/arm/kernel/signal.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 99851cb9591d..f27789e4e38a 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -591,7 +591,7 @@ static int do_signal(struct pt_regs *regs, int syscall) */ switch (retval) { case -ERESTART_RESTARTBLOCK: - restart++; + restart -= 2; case -ERESTARTNOHAND: case -ERESTARTSYS: case -ERESTARTNOINTR: @@ -629,13 +629,9 @@ static int do_signal(struct pt_regs *regs, int syscall) return 0; } - if (unlikely(restart)) { - if (restart > 1) - set_thread_flag(TIF_SYSCALL_RESTARTSYS); - regs->ARM_pc = continue_addr; - } - restore_saved_sigmask(); + if (unlikely(restart)) + regs->ARM_pc = continue_addr; return restart; } @@ -650,13 +646,14 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) return 0; local_irq_enable(); if (thread_flags & _TIF_SIGPENDING) { - if (unlikely(do_signal(regs, syscall))) { + int restart = do_signal(regs, syscall); + if (unlikely(restart)) { /* * Restart without handlers. * Deal with it without leaving * the kernel space. */ - return 1; + return restart; } syscall = 0; } else { |