Skip to contentSkip to conversation

Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

RFC PATCH In review Rafael J. Wysocki 3 participants 6 messages Oct 18, 2007 – Oct 19, 2007

lore
Share & tools
lore
#0 lore raw

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

From: Rafael J. Wysocki <[email protected]>

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).

---
 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/signal.c +1 -1
Index: 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);
 
 }
Acked-by on v1 1/1
#1 lore raw

Hi.

Quoted 4 lines · On Friday 19 October 2007 08:22:35 Rafael J. Wysocki wrote:

From: Rafael J. Wysocki <[email protected]>

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).

Quoted 2 lines
Quoted 18 lines
---
 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23-mm1/kernel/signal.c
===================================================================

kernel/signal.c +1 -1
@@ -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);
 
 }
Signature · 4 lines
Nigel, Michelle, Alisdair and ____________ Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia
Acked-by on v1 1/1
#2 lore raw
In reply to Rafael J. Wysocki

Hi.

Quoted 4 lines · On Friday 19 October 2007 08:22:35 Rafael J. Wysocki wrote:

From: Rafael J. Wysocki <[email protected]>

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).

Quoted 2 lines
Quoted 18 lines
---
 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23-mm1/kernel/signal.c
===================================================================

kernel/signal.c +1 -1
@@ -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);
 
 }
Signature · 4 lines
Nigel, Michelle, Alisdair and ____________ Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia
#3 lore raw
In reply to Rafael J. Wysocki
Quoted 6 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

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).

ACK. We want this in 2.6.24.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#4 lore raw
Quoted 9 lines · Pavel Machek
Quoted 6 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

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).

ACK. We want this in 2.6.24.

Sure, we do.

Greetings,
Rafael