From patchwork Fri Nov 6 09:36:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dasgupta, Romit" X-Patchwork-Id: 58028 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA69b8d2023514 for ; Fri, 6 Nov 2009 09:37:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756341AbZKFJg3 (ORCPT ); Fri, 6 Nov 2009 04:36:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756152AbZKFJg3 (ORCPT ); Fri, 6 Nov 2009 04:36:29 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:40489 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755330AbZKFJg2 convert rfc822-to-8bit (ORCPT ); Fri, 6 Nov 2009 04:36:28 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id nA69a0XQ032123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Nov 2009 03:36:04 -0600 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id nA69Zxs0006393; Fri, 6 Nov 2009 15:05:59 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Fri, 6 Nov 2009 15:06:00 +0530 From: "Dasgupta, Romit" To: "Rafael J. Wysocki" , "pavel@ucw.cz" CC: "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pm@lists.linux-foundation.org" Date: Fri, 6 Nov 2009 15:06:02 +0530 Subject: [PATCH 1/1] PM: Thaws refrigerated and to be exited kernel threads Thread-Topic: [PATCH 1/1] PM: Thaws refrigerated and to be exited kernel threads Thread-Index: AcpexI3YkX8ksHLLSeSQhVt8kYH8Tw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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(); }