summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorZhang Yi <zhang.yi20@zte.com.cn>2014-01-23 15:55:57 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 16:37:02 -0800
commitb88fae644e5e3922251a4b242f435f5e3b49c381 (patch)
tree98bfd036a6df9cad49cb58a372a4fe94d89e7f5a /fs/exec.c
parent8d38f203b46c36626285400b9466b08abecaaa80 (diff)
downloadlwn-b88fae644e5e3922251a4b242f435f5e3b49c381.tar.gz
lwn-b88fae644e5e3922251a4b242f435f5e3b49c381.zip
exec: avoid propagating PF_NO_SETAFFINITY into userspace child
Userspace process doesn't want the PF_NO_SETAFFINITY, but its parent may be a kernel worker thread which has PF_NO_SETAFFINITY set, and this worker thread can do kernel_thread() to create the child. Clearing this flag in usersapce child to enable its migrating capability. Signed-off-by: Zhang Yi <zhang.yi20@zte.com.cn> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 493b102a27c1..44218a7267b2 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1087,8 +1087,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 | PF_NOFREEZE);
+ current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD |
+ PF_NOFREEZE | PF_NO_SETAFFINITY);
flush_thread();
current->personality &= ~bprm->per_clear;