lkml.org 
[lkml]   [2011]   [Apr]   [5]   [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/05, Stas Sergeev wrote:
>
> 05.04.2011 19:15, Oleg Nesterov wrote:
>>>
>>> + p->detaching = 0;
>>> + continue;
>> Yes, thanks, I didn't notice "continue". But then this is wrong again.
>> This can race with wait_task_detached() called by our sub-thread, it
>> can clear ->detaching before we check it.
> But the above code is under write_lock_irq(&tasklist_lock), so why
> would it race?

wait_task_detached() clears detaching, then it drops tasklist and takes
it for writing. forget_original_parent() can come in between.

Oleg.



\
 
 \ /
  Last update: 2011-04-05 18:49    [W:0.211 / U:0.340 seconds]
©2003-2014 Jasper Spaans. Advertise on this site