Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765466AbXJRWJh (ORCPT ); Thu, 18 Oct 2007 18:09:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761690AbXJRWJJ (ORCPT ); Thu, 18 Oct 2007 18:09:09 -0400 Received: from home.nigel.suspend2.net ([203.171.70.205]:43278 "EHLO home.nigel.suspend2.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757998AbXJRWJH (ORCPT ); Thu, 18 Oct 2007 18:09:07 -0400 From: Nigel Cunningham To: "Rafael J. Wysocki" Subject: Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING Date: Fri, 19 Oct 2007 08:09:02 +1000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: LKML , Oleg Nesterov , Pavel Machek , pm list References: <200710190022.36145.rjw@sisk.pl> In-Reply-To: <200710190022.36145.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710190809.03042.nigel@nigel.suspend2.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 44 Hi. On Friday 19 October 2007 08:22:35 Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Do not allow processes to clear their TIF_SIGPENDING if TIF_FREEZE is set, > to prevent them from racing with the freezer (like mysqld does, for example). > > Signed-off-by: Rafael J. Wysocki Acked-by: Nigel Cunningham > --- > kernel/signal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-2.6.23-mm1/kernel/signal.c > =================================================================== > --- linux-2.6.23-mm1.orig/kernel/signal.c > +++ linux-2.6.23-mm1/kernel/signal.c > @@ -124,7 +124,7 @@ void recalc_sigpending_and_wake(struct t > > void recalc_sigpending(void) > { > - if (!recalc_sigpending_tsk(current)) > + if (!recalc_sigpending_tsk(current) && !freezing(current)) > clear_thread_flag(TIF_SIGPENDING); > > } > -- Nigel, Michelle, Alisdair and ____________ Cunningham 5 Mitchell Street Cobden 3266 Victoria, Australia - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/