summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorOleg Nesterov2013-07-04 00:08:32 +0200
committerLinus Torvalds2013-07-04 01:08:03 +0200
commit18c830df771f2ba8b4699fea9af1492275ae627b (patch)
tree01b1dc470a1a30102a3f94e539bdbf74faa548be /fs/exec.c
parentkernel/fork.c:copy_process(): don't add the uninitialized child to thread/tas... (diff)
downloadkernel-qcow2-linux-18c830df771f2ba8b4699fea9af1492275ae627b.tar.gz
kernel-qcow2-linux-18c830df771f2ba8b4699fea9af1492275ae627b.tar.xz
kernel-qcow2-linux-18c830df771f2ba8b4699fea9af1492275ae627b.zip
kernel/fork.c:copy_process(): consolidate the lockless CLONE_THREAD checks
copy_process() does a lot of "chaotic" initializations and checks CLONE_THREAD twice before it takes tasklist. In particular it sets "p->group_leader = p" and then changes it again under tasklist if !thread_group_leader(p). This looks a bit confusing, lets create a single "if (CLONE_THREAD)" block which initializes ->exit_signal, ->group_leader, and ->tgid. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Sergey Dyasly <dserrg@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
0 files changed, 0 insertions, 0 deletions