Subject: + fork-no-need-to-initialize-child-exit_state.patch added to -mm tree To: oleg@xxxxxxxxxx,David.Laight@xxxxxxxxxx,geert@xxxxxxxxxxxxxx,mingo@xxxxxxxxxx,peterz@xxxxxxxxxxxxx,tj@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 20 Nov 2013 14:03:54 -0800 The patch titled Subject: fork: no need to initialize child->exit_state has been added to the -mm tree. Its filename is fork-no-need-to-initialize-child-exit_state.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/fork-no-need-to-initialize-child-exit_state.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/fork-no-need-to-initialize-child-exit_state.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Oleg Nesterov <oleg@xxxxxxxxxx> Subject: fork: no need to initialize child->exit_state A zombie task obviously can't fork(), remove the unnecessary initialization of child->exit_state. It is zero anyway after dup_task_struct(). Note: copy_process() is huge and it has a lot of chaotic initializations, probably it makes sense to move them into the new helper called by dup_task_struct(). Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: David Laight <David.Laight@xxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/fork.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -puN kernel/fork.c~fork-no-need-to-initialize-child-exit_state kernel/fork.c --- a/kernel/fork.c~fork-no-need-to-initialize-child-exit_state +++ a/kernel/fork.c @@ -1402,13 +1402,11 @@ static struct task_struct *copy_process( p->tgid = p->pid; } - p->pdeath_signal = 0; - p->exit_state = 0; - p->nr_dirtied = 0; p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10); p->dirty_paused_when = 0; + p->pdeath_signal = 0; INIT_LIST_HEAD(&p->thread_group); p->task_works = NULL; _ Patches currently in -mm which might be from oleg@xxxxxxxxxx are origin.patch autofs4-allow-autofs-to-work-outside-the-initial-pid-namespace.patch autofs4-translate-pids-to-the-right-namespace-for-the-daemon.patch coredump-set_dumpable-fix-the-theoretical-race-with-itself.patch coredump-kill-mmf_dumpable-and-mmf_dump_securely.patch coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch linux-next.patch proc-cleanup-simplify-get_task_state-task_state_array.patch fork-no-need-to-initialize-child-exit_state.patch exit_state-kill-task_is_dead.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html