[Devel] [RFC][PATCH] Add child reaper to struct pspace
Eric W. Biederman
ebiederm at xmission.com
Thu Sep 7 12:38:52 PDT 2006
Kirill Korotaev <dev at sw.ru> writes:
> Cedric Le Goater wrote:
>> Sukadev Bhattiprolu wrote:
>>
>> <snip>
>>
>>>@@ -620,8 +620,8 @@ static int de_thread(struct task_struct
>>> * Reparenting needs write_lock on tasklist_lock,
>>> * so it is safe to do it under read_lock.
>>> */
>>>- if (unlikely(current->group_leader == child_reaper))
>>>- child_reaper = current;
>>>+ if (unlikely(current->group->leader == current->pspace->child_reaper)
>>>+ current->pspace->child_reaper = current;
>>>
>>> zap_other_threads(current);
>>> read_unlock(&tasklist_lock);
>>
>>
>> I'm unsure about this one ?
> AFAICS, this one is for multithreaded init?
> looks ok, imho.
Correct except for the lack of nsproxy.
The case to think about is when a multi-threaded init exec a
process for a thread where pid != tgid.
It prevents from having problems with an untrusted init process.
Eric
More information about the Devel
mailing list