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>
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user