Commit 1074ddff authored by David S. Miller's avatar David S. Miller Committed by Linus Torvalds

[SPARC]: Port over x86 signal bugfix in cset 1.1431.

parent c85d8ef9
......@@ -1035,8 +1035,6 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
{
switch(regs->u_regs[UREG_I0]) {
case ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
/* fallthrough */
case ERESTARTNOHAND:
no_system_call_restart:
regs->u_regs[UREG_I0] = EINTR;
......@@ -1086,6 +1084,13 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs,
struct k_sigaction *ka;
ka = &current->sighand->action[signr-1];
/* Always make any pending restarted system
* calls return -EINTR.
*/
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
if (cookie.restart_syscall)
syscall_restart(cookie.orig_i0, regs, &ka->sa);
handle_signal(signr, ka, &info, oldset, regs, svr4_signal);
......
......@@ -579,8 +579,6 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
{
switch (regs->u_regs[UREG_I0]) {
case ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
/* fallthrough */
case ERESTARTNOHAND:
no_system_call_restart:
regs->u_regs[UREG_I0] = EINTR;
......@@ -628,6 +626,13 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs,
struct k_sigaction *ka;
ka = &current->sighand->action[signr-1];
/* Always make any pending restarted system
* calls return -EINTR.
*/
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
if (cookie.restart_syscall)
syscall_restart(orig_i0, regs, &ka->sa);
handle_signal(signr, ka, &info, oldset, regs);
......
......@@ -1221,8 +1221,6 @@ static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs
{
switch (regs->u_regs[UREG_I0]) {
case ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
/* fallthrough */
case ERESTARTNOHAND:
no_system_call_restart:
regs->u_regs[UREG_I0] = EINTR;
......@@ -1259,6 +1257,13 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs,
struct k_sigaction *ka;
ka = &current->sighand->action[signr-1];
/* Always make any pending restarted system
* calls return -EINTR.
*/
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
if (cookie.restart_syscall)
syscall_restart32(orig_i0, regs, &ka->sa);
handle_signal32(signr, ka, &info, oldset, regs, svr4_signal);
......
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