From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dasgupta, Romit" Subject: [PATCH 1/1] PM: Thaws refrigerated and to be exited kernel threads Date: Fri, 6 Nov 2009 15:06:02 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: "Rafael J. Wysocki" , "pavel@ucw.cz" Cc: "linux-pm@lists.linux-foundation.org" , "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" List-Id: linux-pm@vger.kernel.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 --- 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 #include #include +#include /* * 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(); }