]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
m68knommu: Handle multiple pending signals
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 12 Oct 2010 03:29:28 +0000 (23:29 -0400)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 7 Jan 2011 13:06:59 +0000 (14:06 +0100)
we shouldn't bugger off to userland when there still are
pending signals; among other things it makes e.g. SIGSEGV
triggered by failure to build a sigframe to be delivered
_now_ and not when we hit the next syscall or interrupt.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68knommu/kernel/signal.c
arch/m68knommu/platform/68328/entry.S
arch/m68knommu/platform/68360/entry.S
arch/m68knommu/platform/coldfire/entry.S

index c973230dad828fade729f11bd0027cd23ed88792..c070f3f64255091a9bda36dfc05cd7f7b0fb8ba1 100644 (file)
@@ -717,7 +717,7 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
  * want to handle. Thus you cannot kill init even with a SIGKILL even by
  * mistake.
  */
-asmlinkage int do_signal(struct pt_regs *regs)
+asmlinkage void do_signal(struct pt_regs *regs)
 {
        struct k_sigaction ka;
        siginfo_t info;
@@ -731,7 +731,7 @@ asmlinkage int do_signal(struct pt_regs *regs)
         * if so.
         */
        if (!user_mode(regs))
-               return 1;
+               return;
 
        if (test_thread_flag(TIF_RESTORE_SIGMASK))
                oldset = &current->saved_sigmask;
@@ -743,7 +743,7 @@ asmlinkage int do_signal(struct pt_regs *regs)
                /* Whee!  Actually deliver the signal.  */
                handle_signal(signr, &ka, &info, oldset, regs);
                clear_thread_flag(TIF_RESTORE_SIGMASK);
-               return 1;
+               return;
        }
 
        /* Did we come from a system call? */
@@ -757,5 +757,4 @@ asmlinkage int do_signal(struct pt_regs *regs)
                clear_thread_flag(TIF_RESTORE_SIGMASK);
                sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
        }
-       return 0;
 }
index 6eeb635fab7e07d78737d4d82199382f14b3a3c2..240a7a6e25c8476778eea402cc89235c675665dd 100644 (file)
@@ -106,6 +106,7 @@ Luser_return:
        movel   %sp,%d1                 /* get thread_info pointer */
        andl    #-THREAD_SIZE,%d1
        movel   %d1,%a2
+1:
        move    %a2@(TI_FLAGS),%d1      /* thread_info->flags */
        andl    #_TIF_WORK_MASK,%d1
        jne     Lwork_to_do
@@ -124,8 +125,7 @@ Lsignal_return:
        addql   #4,%sp
        RESTORE_SWITCH_STACK
        addql   #4,%sp
-Lreturn:
-       RESTORE_ALL
+       jra     1b
 
 /*
  * This is the main interrupt handler, responsible for calling process_int()
index 2a671da4af6f14f67801a8850ca71608a6e51ae7..8a28788c0eea5aec95e57f3b9eec972ecf7ae454 100644 (file)
@@ -102,6 +102,7 @@ Luser_return:
        movel   %sp,%d1                 /* get thread_info pointer */
        andl    #-THREAD_SIZE,%d1
        movel   %d1,%a2
+1:
        move    %a2@(TI_FLAGS),%d1      /* thread_info->flags */
        andl    #_TIF_WORK_MASK,%d1
        jne     Lwork_to_do
@@ -120,8 +121,7 @@ Lsignal_return:
        addql   #4,%sp
        RESTORE_SWITCH_STACK
        addql   #4,%sp
-Lreturn:
-       RESTORE_ALL
+       jra     1b
 
 /*
  * This is the main interrupt handler, responsible for calling do_IRQ()
index ed2878829dbd4a70b2dd0da3682ea657d709de2a..e1debc8285efa648a65640e303d18d0f8434c4b9 100644 (file)
@@ -171,7 +171,7 @@ Lsignal_return:
        addql   #4,%sp
        RESTORE_SWITCH_STACK
        addql   #4,%sp
-       jmp     Lreturn
+       jmp     Luser_return
 
 /*
  * This is the generic interrupt handler (for all hardware interrupt