Commit ff6852e4 authored by Russell King's avatar Russell King

[ARM] Fix system call restarting

Always disable system call restart when returning from a signal
handler.  This follows the new x86 behaviour.
parent 6ebed0fa
...@@ -187,6 +187,9 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) ...@@ -187,6 +187,9 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
struct sigframe *frame; struct sigframe *frame;
sigset_t set; sigset_t set;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
/* /*
* Since we stacked the signal on a 64-bit boundary, * Since we stacked the signal on a 64-bit boundary,
* then 'sp' should be word aligned here. If it's * then 'sp' should be word aligned here. If it's
...@@ -232,6 +235,9 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) ...@@ -232,6 +235,9 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
struct rt_sigframe *frame; struct rt_sigframe *frame;
sigset_t set; sigset_t set;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
/* /*
* Since we stacked the signal on a 64-bit boundary, * Since we stacked the signal on a 64-bit boundary,
* then 'sp' should be word aligned here. If it's * then 'sp' should be word aligned here. If it's
...@@ -462,8 +468,6 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, ...@@ -462,8 +468,6 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
if (syscall) { if (syscall) {
switch (regs->ARM_r0) { switch (regs->ARM_r0) {
case -ERESTART_RESTARTBLOCK: case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
case -ERESTARTNOHAND: case -ERESTARTNOHAND:
regs->ARM_r0 = -EINTR; regs->ARM_r0 = -EINTR;
break; break;
......
Markdown is supported
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