Messages in this thread Patch in this message | | | Subject | [PATCH]: exec: avoid propagating PF_NO_SETAFFINITY into userspace child | From | zhang.yi20@zte ... | Date | Tue, 26 Nov 2013 10:10:32 +0800 |
| |
Userspace process doesn't want the PF_NO_SETAFFINITY, but its parent may be a kernel worker thread which has PF_NO_SETAFFINITY set. Clearing this flag in usersapce child to enable its migrating capability.
Signed-off-by: Zhang Yi <zhang.yi20@zte.com.cn>
--- linux-3.12.old/fs/exec.c 2013-11-26 08:53:12.175811856 +0000 +++ linux-3.12/fs/exec.c 2013-11-26 09:26:53.575999604 +0000 @@ -1091,7 +1091,8 @@ int flush_old_exec(struct linux_binprm *
set_fs(USER_DS); current->flags &= - ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE); + ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE + | PF_NO_SETAFFINITY); flush_thread(); current->personality &= ~bprm->per_clear;
Thanks.
| |