aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2006-03-23 06:00:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:08 -0500
commitfc558a7496bfab3d29a68953b07a95883fdcfbb1 (patch)
treef40935c321e088b40608ebbcc8fc502d269578da
parentce6ed29f3136bc4b3644ecf4091d6390d444f628 (diff)
[PATCH] swsusp: finally solve mysqld problem
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>
-rw-r--r--arch/i386/kernel/signal.c4
-rw-r--r--arch/x86_64/kernel/signal.c4
-rw-r--r--kernel/signal.c3
3 files changed, 2 insertions, 9 deletions
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
index 608eac4a7324..5c352c3a9e7f 100644
--- a/arch/i386/kernel/signal.c
+++ b/arch/i386/kernel/signal.c
@@ -583,9 +583,6 @@ static void fastcall do_signal(struct pt_regs *regs)
583 if (!user_mode(regs)) 583 if (!user_mode(regs))
584 return; 584 return;
585 585
586 if (try_to_freeze())
587 goto no_signal;
588
589 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 586 if (test_thread_flag(TIF_RESTORE_SIGMASK))
590 oldset = &current->saved_sigmask; 587 oldset = &current->saved_sigmask;
591 else 588 else
@@ -614,7 +611,6 @@ static void fastcall do_signal(struct pt_regs *regs)
614 return; 611 return;
615 } 612 }
616 613
617no_signal:
618 /* Did we come from a system call? */ 614 /* Did we come from a system call? */
619 if (regs->orig_eax >= 0) { 615 if (regs->orig_eax >= 0) {
620 /* Restart the system call - no handlers present */ 616 /* Restart the system call - no handlers present */
diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c
index 5876df116c92..e5f5ce7909a3 100644
--- a/arch/x86_64/kernel/signal.c
+++ b/arch/x86_64/kernel/signal.c
@@ -443,9 +443,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
443 if (!user_mode(regs)) 443 if (!user_mode(regs))
444 return 1; 444 return 1;
445 445
446 if (try_to_freeze())
447 goto no_signal;
448
449 if (!oldset) 446 if (!oldset)
450 oldset = &current->blocked; 447 oldset = &current->blocked;
451 448
@@ -463,7 +460,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
463 return handle_signal(signr, &info, &ka, oldset, regs); 460 return handle_signal(signr, &info, &ka, oldset, regs);
464 } 461 }
465 462
466 no_signal:
467 /* Did we come from a system call? */ 463 /* Did we come from a system call? */
468 if ((long)regs->orig_rax >= 0) { 464 if ((long)regs->orig_rax >= 0) {
469 /* Restart the system call - no handlers present */ 465 /* Restart the system call - no handlers present */
diff --git a/kernel/signal.c b/kernel/signal.c
index ea154104a00b..dfb09ba5c013 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1922,6 +1922,8 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
1922 sigset_t *mask = &current->blocked; 1922 sigset_t *mask = &current->blocked;
1923 int signr = 0; 1923 int signr = 0;
1924 1924
1925 try_to_freeze();
1926
1925relock: 1927relock:
1926 spin_lock_irq(&current->sighand->siglock); 1928 spin_lock_irq(&current->sighand->siglock);
1927 for (;;) { 1929 for (;;) {
@@ -2307,7 +2309,6 @@ sys_rt_sigtimedwait(const sigset_t __user *uthese,
2307 2309
2308 timeout = schedule_timeout_interruptible(timeout); 2310 timeout = schedule_timeout_interruptible(timeout);
2309 2311
2310 try_to_freeze();
2311 spin_lock_irq(&current->sighand->siglock); 2312 spin_lock_irq(&current->sighand->siglock);
2312 sig = dequeue_signal(current, &these, &info); 2313 sig = dequeue_signal(current, &these, &info);
2313 current->blocked = current->real_blocked; 2314 current->blocked = current->real_blocked;