freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD
authorOleg Nesterov <oleg@redhat.com>
Thu, 25 Oct 2012 20:28:12 +0000 (22:28 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 25 Oct 2012 20:28:12 +0000 (22:28 +0200)
flush_old_exec() clears PF_KTHREAD but forgets about PF_NOFREEZE.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
fs/exec.c

index 8b9011b..0039055 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1083,7 +1083,8 @@ int flush_old_exec(struct linux_binprm * bprm)
        bprm->mm = NULL;                /* We're using it now */
 
        set_fs(USER_DS);
-       current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD);
+       current->flags &=
+               ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE);
        flush_thread();
        current->personality &= ~bprm->per_clear;