Commit 9ae26027 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

update the comment in kthread_stop()

Commit 63706172 ("kthreads: rework
kthread_stop()") removed the limitation that the thread function mysr
not call do_exit() itself, 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: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6560dc16
...@@ -180,10 +180,12 @@ EXPORT_SYMBOL(kthread_bind); ...@@ -180,10 +180,12 @@ EXPORT_SYMBOL(kthread_bind);
* @k: thread created by kthread_create(). * @k: thread created by kthread_create().
* *
* Sets kthread_should_stop() for @k to return true, wakes it, and * Sets kthread_should_stop() for @k to return true, wakes it, and
* waits for it to exit. Your threadfn() must not call do_exit() * waits for it to exit. This can also be called after kthread_create()
* itself if you use this function! This can also be called after * instead of calling wake_up_process(): the thread will exit without
* kthread_create() instead of calling wake_up_process(): the thread * calling threadfn().
* 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() * Returns the result of threadfn(), or %-EINTR if wake_up_process()
* was never called. * was never called.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment