aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/kernel/signal.c')
-rw-r--r--arch/m68k/kernel/signal.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index f9af893cd289..de2d05ddd86d 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -326,6 +326,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u
326 struct sigcontext context; 326 struct sigcontext context;
327 int err; 327 int err;
328 328
329 /* Always make any pending restarted system calls return -EINTR */
330 current_thread_info()->restart_block.fn = do_no_restart_syscall;
331
329 /* get previous context */ 332 /* get previous context */
330 if (copy_from_user(&context, usc, sizeof(context))) 333 if (copy_from_user(&context, usc, sizeof(context)))
331 goto badframe; 334 goto badframe;
@@ -411,6 +414,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
411 unsigned long usp; 414 unsigned long usp;
412 int err; 415 int err;
413 416
417 /* Always make any pending restarted system calls return -EINTR */
418 current_thread_info()->restart_block.fn = do_no_restart_syscall;
419
414 err = __get_user(temp, &uc->uc_mcontext.version); 420 err = __get_user(temp, &uc->uc_mcontext.version);
415 if (temp != MCONTEXT_VERSION) 421 if (temp != MCONTEXT_VERSION)
416 goto badframe; 422 goto badframe;
@@ -937,6 +943,15 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
937 regs->d0 = -EINTR; 943 regs->d0 = -EINTR;
938 break; 944 break;
939 945
946 case -ERESTART_RESTARTBLOCK:
947 if (!has_handler) {
948 regs->d0 = __NR_restart_syscall;
949 regs->pc -= 2;
950 break;
951 }
952 regs->d0 = -EINTR;
953 break;
954
940 case -ERESTARTSYS: 955 case -ERESTARTSYS:
941 if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) { 956 if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) {
942 regs->d0 = -EINTR; 957 regs->d0 = -EINTR;