Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-19 Thread Rafael J. Wysocki
On Friday, 19 October 2007 09:55, Pavel Machek wrote:
> On Fri 2007-10-19 00: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).
> > 
> > Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
> 
> ACK. We want this in 2.6.24.

Sure, we do.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-19 Thread Pavel Machek
On Fri 2007-10-19 00: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).
> 
> Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>

ACK. We want this in 2.6.24.
Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-19 Thread Pavel Machek
On Fri 2007-10-19 00: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).
 
 Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]

ACK. We want this in 2.6.24.
Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-19 Thread Rafael J. Wysocki
On Friday, 19 October 2007 09:55, Pavel Machek wrote:
 On Fri 2007-10-19 00: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).
  
  Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]
 
 ACK. We want this in 2.6.24.

Sure, we do.

Greetings,
Rafael
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-18 Thread Nigel Cunningham
Hi.

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).
> 
> Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>

Acked-by: Nigel Cunningham <[EMAIL PROTECTED]>

> ---
>  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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-18 Thread 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).

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-18 Thread 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).

Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]
---
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH -mm] Freezer: Do not allow freezing processes to clear TIF_SIGPENDING

2007-10-18 Thread Nigel Cunningham
Hi.

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).
 
 Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]

Acked-by: Nigel Cunningham [EMAIL PROTECTED]

 ---
  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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/