Skip to contentSkip to conversation

Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

PATCH New Rafael J. Wysocki 1 participant 1 message Oct 23, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

[Please consider as 2.6.24 material.]
---
From: Rafael J. Wysocki <[email protected]>

Do not allow processes to clear their TIF_SIGPENDING if TIF_FREEZE is set, so that they will not race with the freezer (like mysqld does, for example).

---
 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/signal.c +1 -1
Index: linux-2.6.23/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);
 
 }