]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:03:02 +0000 (10:03 -0700)
commit b40a79591ca918e7b91b0d9b6abd5d00f2e88c19 upstream.

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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exec.c

index 126e01cb24345faaa3f448a45cce4b3a8a6c1bdc..6c4791d4634a90a6b435018f3d822fcbae00a4b2 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1114,7 +1114,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;