lkml.org 
[lkml]   [2007]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kthread: Enhance kthread_stop to abort interruptible sleeps
On 04/24, Eric W. Biederman wrote:
>
> The NULL vfork_done is really weird as exec is the only thing that sets
> vfork_done to NULL.

Hm, mm_release() clears ->vfork_done before complete().

mm_release:

struct completion *vfork_done = tsk->vfork_done;

if (vfork_done) {
tsk->vfork_done = NULL;
complete(vfork_done);
}


kthread_stop:

set_tsk_thread_flag(tsk, TIF_KTHREAD_STOP);
signal_wake_up(tsk, 1);

// tsk exits, sets ->vfork_done == NULL

wait_for_completion(tsk->vfork_done);


Probably Rafael worried about this, but I misunderstood him...

Oleg.

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

\
 
 \ /
  Last update: 2007-04-24 17:09    [W:0.180 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site