Skip to contentSkip to conversation

+ fork-no-need-to-initialize-child-exit_state.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Nov 20, 2013

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + fork-no-need-to-initialize-child-exit_state.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
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 <[email protected]>
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().

Cc Peter Zijlstra <[email protected]>
Cc David Laight <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Tejun Heo <[email protected]>

---

 kernel/fork.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/fork.c renamed from kernel/fork.c~fork-no-need-to-initialize-child-exit_state +0 -2
diff -puN kernel/fork.c~fork-no-need-to-initialize-child-exit_state 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;