Re: [RFC,PATCH 2/2] change __wake_up_parent() to use filteredwakeup

From: Roland McGrath
Date: Wed Jun 24 2009 - 15:43:37 EST


> > Agreed. The not-right case I had in mind was do_notify_parent_cldstop
> > where maybe it could be ->real_parent of the untraced group_leader.
>
> Hmm. Could you explain?
>
> I feel I missed something, but can't understand.

Sorry, it wasn't very clear. (I guess I should have said "traced group
leader", though that would not have been much more obvious.)

do_notify_parent_cldstop:

if (task_ptrace(tsk))
parent = tsk->parent;
else {
tsk = tsk->group_leader;
parent = tsk->real_parent;
}
...
__wake_up_parent(tsk, parent);

In the "else" case, parent is not necessarily tsk->parent. That is, if
an untraced thread calls do_notify_parent_cldstop() but its group_leader
is ptrace_reparented(). Then waitee->group_leader->real_parent is who
gets the wakeup, but __wake_up_parent->child_wait_wakeup would check
only waiter == waitee->group_leader->parent.


Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/