The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/1] PM: Thaws refrigerated and to be exited kernel threads
@ 2009-11-06  9:36 Dasgupta, Romit
  2009-11-07 16:54 ` Pavel Machek
  0 siblings, 1 reply; 9+ messages in thread
From: Dasgupta, Romit @ 2009-11-06  9:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, pavel@ucw.cz
  Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org

Kicks out a frozen thread from the refrigerator when an active thread has
invoked kthread_stop on the frozen thread.

Signed-off-by: Romit Dasgupta <romit@ti.com>
---

diff --git a/kernel/freezer.c b/kernel/freezer.c
index bd1d42b..c28dbe8 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -9,6 +9,7 @@
 #include <linux/module.h>
 #include <linux/syscalls.h>
 #include <linux/freezer.h>
+#include <linux/kthread.h>
 
 /*
  * freezing is complete, mark current process as frozen
@@ -49,7 +50,7 @@ void refrigerator(void)
 
 	for (;;) {
 		set_current_state(TASK_UNINTERRUPTIBLE);
-		if (!frozen(current))
+		if (!frozen(current) || (!current->mm && kthread_should_stop()))
 			break;
 		schedule();
 	}

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-09 12:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06  9:36 [PATCH 1/1] PM: Thaws refrigerated and to be exited kernel threads Dasgupta, Romit
2009-11-07 16:54 ` Pavel Machek
2009-11-08  4:22   ` Dasgupta, Romit
2009-11-08  8:27     ` Pavel Machek
2009-11-08 11:00       ` Dasgupta, Romit
2009-11-08 11:10       ` Dasgupta, Romit
2009-11-09  8:31         ` Pavel Machek
2009-11-09  9:18           ` Dasgupta, Romit
2009-11-09 12:06             ` Rafael J. Wysocki

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