]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
copy_process: fix CLONE_PARENT && parent_exec_id interaction
authorOleg Nesterov <oleg@redhat.com>
Mon, 2 Mar 2009 21:58:45 +0000 (22:58 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 00:32:27 +0000 (17:32 -0700)
commit5e32aa7c4c760ee75dbce330c3374e177ceea18f
treef39dd5bfc2a8eb246576cb27aee8d7ed3340af76
parent9bff90cbe5839f3ab35fe7cafb91632c790ad736
copy_process: fix CLONE_PARENT && parent_exec_id interaction

commit 2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205 upstream.

CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use ->parent_exec_id to make
sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed
task exits.

Also, move down the "p->parent_exec_id = p->self_exec_id" thing, to place
two different cases together.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/fork.c