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>
if (!user_mode(regs))
return;
- if (try_to_freeze())
- goto no_signal;
-
if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = ¤t->saved_sigmask;
else
return;
}
-no_signal:
/* Did we come from a system call? */
if (regs->orig_eax >= 0) {
/* Restart the system call - no handlers present */
if (!user_mode(regs))
return 1;
- if (try_to_freeze())
- goto no_signal;
-
if (!oldset)
oldset = ¤t->blocked;
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 */
sigset_t *mask = ¤t->blocked;
int signr = 0;
+ try_to_freeze();
+
relock:
spin_lock_irq(¤t->sighand->siglock);
for (;;) {
timeout = schedule_timeout_interruptible(timeout);
- try_to_freeze();
spin_lock_irq(¤t->sighand->siglock);
sig = dequeue_signal(current, &these, &info);
current->blocked = current->real_blocked;