lkml.org 
[lkml]   [2011]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [path][rfc] add PR_DETACH prctl command
On 04/08, Stas Sergeev wrote:
>
> I updated patch to fix the race between wait_task_detached()
> and wait_task_zombie() by using is_detaching flag.
> Here's the patch.
> What problems do remain here?

Stas, sorry, I simply have no time to read this patch. Not to mention,
you know that I dislike it in any case.

I only quickly looked at the changes in sys_prctl and they are definitely
wrong.

> + me->real_parent = pid_ns->child_reaper;
> + if (thread_group_leader(me)) {
> + list_move_tail(&me->sibling,
> + &me->real_parent->children);
> + /* reparent threads */
> + p = me;
> + while_each_thread(me, p) {
> + if (!task_ptrace(p))
> + p->parent = pid_ns->child_reaper;
> + p->real_parent = pid_ns->child_reaper;

Why do you check thread_group_leader() ???? What if the caller is not
the leader?

I told this many times, and I got lost. If you reparent, you should
always reparent the whole group.

Also, you are doing do_signal_parent(me). I do not know what it does
(once again, I didn't read the patch), but this looks suspicious.
A sub-thread shouldn't notify the parent.

Oleg.



\
 
 \ /
  Last update: 2011-04-08 20:59    [W:0.854 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site