[PATCH] swsusp: finally solve mysqld problem
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 23 Mar 2006 11:00:05 +0000 (03:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:08 +0000 (07:38 -0800)
This patch from Pavel moves userland freeze signals handling into more logical
place.  It now hits even with mysqld running.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/signal.c
arch/x86_64/kernel/signal.c
kernel/signal.c

index 608eac4a7324d99de696b66c77a503d3165b73c5..5c352c3a9e7fa00492da1ff1c33a28ad0b5217c7 100644 (file)
@@ -583,9 +583,6 @@ static void fastcall do_signal(struct pt_regs *regs)
        if (!user_mode(regs))
                return;
 
-       if (try_to_freeze())
-               goto no_signal;
-
        if (test_thread_flag(TIF_RESTORE_SIGMASK))
                oldset = &current->saved_sigmask;
        else
@@ -614,7 +611,6 @@ static void fastcall do_signal(struct pt_regs *regs)
                return;
        }
 
-no_signal:
        /* Did we come from a system call? */
        if (regs->orig_eax >= 0) {
                /* Restart the system call - no handlers present */
index 5876df116c9225ef449e58a3d06e3de9b66c6445..e5f5ce7909a32e6e0cc3e56bb8b48c1dc7882d1d 100644 (file)
@@ -443,9 +443,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
        if (!user_mode(regs))
                return 1;
 
-       if (try_to_freeze())
-               goto no_signal;
-
        if (!oldset)
                oldset = &current->blocked;
 
@@ -463,7 +460,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
                return handle_signal(signr, &info, &ka, oldset, regs);
        }
 
- no_signal:
        /* Did we come from a system call? */
        if ((long)regs->orig_rax >= 0) {
                /* Restart the system call - no handlers present */
index ea154104a00bf43a6a62a7d90d229465a4bfbc95..dfb09ba5c013ea56d6d981f314f3dd53c9a4180b 100644 (file)
@@ -1922,6 +1922,8 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
        sigset_t *mask = &current->blocked;
        int signr = 0;
 
+       try_to_freeze();
+
 relock:
        spin_lock_irq(&current->sighand->siglock);
        for (;;) {
@@ -2307,7 +2309,6 @@ sys_rt_sigtimedwait(const sigset_t __user *uthese,
 
                        timeout = schedule_timeout_interruptible(timeout);
 
-                       try_to_freeze();
                        spin_lock_irq(&current->sighand->siglock);
                        sig = dequeue_signal(current, &these, &info);
                        current->blocked = current->real_blocked;