Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49b12d4f5e274517b8bc032d507abf31cc2f4150
Commit:     49b12d4f5e274517b8bc032d507abf31cc2f4150
Parent:     ba96a0c88098697a63e80157718b7440414ed24d
Author:     Rafael J. Wysocki <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 13:57:26 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 23 20:14:11 2007 -0700

    freezer: take kernel_execve into consideration
    
    Kernel threads can become userland processes by calling kernel_execve().
    
    In particular, this may happen right after the try_to_freeze_tasks()
    called with FREEZER_USER_SPACE has returned, so try_to_freeze_tasks()
    needs to take userspace processes into consideration even if it is
    called with FREEZER_KERNEL_THREADS.
    
    Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
    Acked-by: Pavel Machek <[EMAIL PROTECTED]>
    Cc: Gautham R Shenoy <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/power/process.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/power/process.c b/kernel/power/process.c
index eefca85..2cea265 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -120,7 +120,7 @@ static unsigned int try_to_freeze_tasks(int 
freeze_user_space)
                                cancel_freezing(p);
                                continue;
                        }
-                       if (is_user_space(p) == !freeze_user_space)
+                       if (freeze_user_space && !is_user_space(p))
                                continue;
 
                        freeze_process(p);
@@ -147,7 +147,7 @@ static unsigned int try_to_freeze_tasks(int 
freeze_user_space)
                                TIMEOUT / HZ, todo);
                read_lock(&tasklist_lock);
                do_each_thread(g, p) {
-                       if (is_user_space(p) == !freeze_user_space)
+                       if (freeze_user_space && !is_user_space(p))
                                continue;
 
                        task_lock(p);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to