diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-06-19 02:51:13 +0200 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-07-29 10:34:19 +1000 |
commit | 0137df4f445292ca6ca6e026ad50f08c105f97a8 (patch) | |
tree | b41e38772fe40657928006ef82aa46b8a972d23d /kernel | |
parent | 5fd0af6ee5ca80e64977ac6ec34be95a260a94d4 (diff) |
trivial, update the comment in kthread_stop()
"kthreads: rework kthread_stop()"
commit 63706172f332fd3f6e7458ebfb35fa6de9c21dc5 removed the limitation,
but forgot to update the comment.
Since that commit it is OK to use kthread_stop() even if kthread can exit
itself.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kthread.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c index 9b1a7de26979..eb8751aa0418 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -180,10 +180,12 @@ EXPORT_SYMBOL(kthread_bind); * @k: thread created by kthread_create(). * * Sets kthread_should_stop() for @k to return true, wakes it, and - * waits for it to exit. Your threadfn() must not call do_exit() - * itself if you use this function! This can also be called after - * kthread_create() instead of calling wake_up_process(): the thread - * will exit without calling threadfn(). + * waits for it to exit. This can also be called after kthread_create() + * instead of calling wake_up_process(): the thread will exit without + * calling threadfn(). + * + * If threadfn() may call do_exit() itself, the caller must ensure + * task_struct can't go away. * * Returns the result of threadfn(), or %-EINTR if wake_up_process() * was never called. |