[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>
This commit is contained in:
parent
ce6ed29f31
commit
fc558a7496
@ -583,9 +583,6 @@ static void fastcall do_signal(struct pt_regs *regs)
|
|||||||
if (!user_mode(regs))
|
if (!user_mode(regs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (try_to_freeze())
|
|
||||||
goto no_signal;
|
|
||||||
|
|
||||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||||
oldset = ¤t->saved_sigmask;
|
oldset = ¤t->saved_sigmask;
|
||||||
else
|
else
|
||||||
@ -614,7 +611,6 @@ static void fastcall do_signal(struct pt_regs *regs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
no_signal:
|
|
||||||
/* Did we come from a system call? */
|
/* Did we come from a system call? */
|
||||||
if (regs->orig_eax >= 0) {
|
if (regs->orig_eax >= 0) {
|
||||||
/* Restart the system call - no handlers present */
|
/* Restart the system call - no handlers present */
|
||||||
|
@ -443,9 +443,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
|
|||||||
if (!user_mode(regs))
|
if (!user_mode(regs))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (try_to_freeze())
|
|
||||||
goto no_signal;
|
|
||||||
|
|
||||||
if (!oldset)
|
if (!oldset)
|
||||||
oldset = ¤t->blocked;
|
oldset = ¤t->blocked;
|
||||||
|
|
||||||
@ -463,7 +460,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
|
|||||||
return handle_signal(signr, &info, &ka, oldset, regs);
|
return handle_signal(signr, &info, &ka, oldset, regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
no_signal:
|
|
||||||
/* Did we come from a system call? */
|
/* Did we come from a system call? */
|
||||||
if ((long)regs->orig_rax >= 0) {
|
if ((long)regs->orig_rax >= 0) {
|
||||||
/* Restart the system call - no handlers present */
|
/* Restart the system call - no handlers present */
|
||||||
|
@ -1922,6 +1922,8 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
|
|||||||
sigset_t *mask = ¤t->blocked;
|
sigset_t *mask = ¤t->blocked;
|
||||||
int signr = 0;
|
int signr = 0;
|
||||||
|
|
||||||
|
try_to_freeze();
|
||||||
|
|
||||||
relock:
|
relock:
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -2307,7 +2309,6 @@ sys_rt_sigtimedwait(const sigset_t __user *uthese,
|
|||||||
|
|
||||||
timeout = schedule_timeout_interruptible(timeout);
|
timeout = schedule_timeout_interruptible(timeout);
|
||||||
|
|
||||||
try_to_freeze();
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sig = dequeue_signal(current, &these, &info);
|
sig = dequeue_signal(current, &these, &info);
|
||||||
current->blocked = current->real_blocked;
|
current->blocked = current->real_blocked;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user