[lkml]   [2011]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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.


 \ /
  Last update: 2011-04-05 18:49    [from the cache]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site