Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360136
b: refs/heads/master
c: 55bb948
h: refs/heads/master
v: v3
  • Loading branch information
Vineet Gupta committed Feb 15, 2013
1 parent 881d584 commit 2de3faa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c39c0ab5e862cf71cda1fc39a5cedd4e2f18c6e
refs/heads/master: 55bb9480f9159b229ac3c3454c97b62d1e0a7e80
3 changes: 3 additions & 0 deletions trunk/arch/arc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ struct callee_regs {
#define in_syscall(regs) (regs->event & orig_r8_IS_SCALL)
#define in_brkpt_trap(regs) (regs->event & orig_r8_IS_BRKPT)

#define syscall_wont_restart(regs) (regs->event |= orig_r8_IS_SCALL_RESTARTED)
#define syscall_restartable(regs) !(regs->event & orig_r8_IS_SCALL_RESTARTED)

#define current_pt_regs() \
({ \
/* open-coded current_thread_info() */ \
Expand Down
12 changes: 8 additions & 4 deletions trunk/arch/arc/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ SYSCALL_DEFINE0(rt_sigreturn)
if (restore_altstack(&sf->uc.uc_stack))
goto badframe;

/* Don't restart from sigreturn */
syscall_wont_restart(regs);

return regs->r0;

badframe:
Expand Down Expand Up @@ -318,13 +321,13 @@ void do_signal(struct pt_regs *regs)

signr = get_signal_to_deliver(&info, &ka, regs, NULL);

/* Are we from a system call? */
restart_scall = in_syscall(regs);
restart_scall = in_syscall(regs) && syscall_restartable(regs);

if (signr > 0) {
if (restart_scall)
if (restart_scall) {
arc_restart_syscall(&ka, regs);

syscall_wont_restart(regs); /* No more restarts */
}
handle_signal(signr, &ka, &info, regs);
return;
}
Expand All @@ -339,6 +342,7 @@ void do_signal(struct pt_regs *regs)
regs->r8 = __NR_restart_syscall;
regs->ret -= 4;
}
syscall_wont_restart(regs); /* No more restarts */
}

/* If there's no signal to deliver, restore the saved sigmask back */
Expand Down

0 comments on commit 2de3faa

Please sign in to comment.