mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [pm] Better method of getting rid of signals
@ 2003-10-10 10:14 Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2003-10-10 10:14 UTC (permalink / raw)
  To: kernel list, Patrick Mochel

Hi!

recalc_sigpending() seems like better idea, since it does not have
potential to kill some signal. Now with proper locking. Please apply,

								Pavel

--- tmp/linux/kernel/power/process.c	2003-08-27 12:00:53.000000000 +0200
+++ linux/kernel/power/process.c	2003-10-09 11:21:14.000000000 +0200
@@ -49,10 +49,11 @@
 	pr_debug("%s entered refrigerator\n", current->comm);
 	printk("=");
 	current->flags &= ~PF_FREEZE;
-	if (flag)
-		flush_signals(current); /* We have signaled a kernel thread, which isn't normal behaviour
-					   and that may lead to 100%CPU sucking because those threads
-					   just don't manage signals. */
+
+	spin_lock_irq(&current->sighand->siglock);
+	recalc_sigpending(); /* We sent fake signal, clean it up */
+	spin_unlock_irq(&current->sighand->siglock);
+
 	current->flags |= PF_FROZEN;
 	while (current->flags & PF_FROZEN)
 		schedule();

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-10 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-10 10:14 [pm] Better method of getting rid of signals Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®