Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764984AbXJRWG5 (ORCPT ); Thu, 18 Oct 2007 18:06:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757998AbXJRWGu (ORCPT ); Thu, 18 Oct 2007 18:06:50 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:48175 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755874AbXJRWGt (ORCPT ); Thu, 18 Oct 2007 18:06:49 -0400 From: "Rafael J. Wysocki" To: LKML Subject: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING Date: Fri, 19 Oct 2007 00:22:35 +0200 User-Agent: KMail/1.9.5 Cc: Nigel Cunningham , Oleg Nesterov , Pavel Machek , pm list MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710190022.36145.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 28 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 --- 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); } - 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/