light: workaround nasty race on kthread_stop()

This commit is contained in:
Thomas Schoebel-Theuer 2013-06-27 10:05:58 +02:00
parent e0ed98eb14
commit 58e6ae23ad
1 changed files with 8 additions and 0 deletions

View File

@ -4415,6 +4415,14 @@ static void __exit exit_light(void)
MARS_DBG("====================== stopped everything.\n");
exit_say();
printk(KERN_INFO "stopped MARS\n");
/* Workaround for nasty race: some kernel threads have not yet
* really finished even _after_ kthread_stop() and may execute
* some code which will disappear right after return from this
* function.
* A correct solution would probably need the help of the kernel
* scheduler.
*/
brick_msleep(1000);
}
static int __init init_light(void)