Messages in this thread | | | From | Ganesh Karuppur Rajagopalan <> | Date | Thu, 21 Jul 2011 17:13:52 -0400 | Subject | Stopping a kthread in module exit(system hangs!) - linux 2.6.39.1 |
| |
Hi all,
The kernel version we are using is 2.6.39.1 . In our block device driver module we create and run a kthread using "kthread_run" during module_init.This kthread runs until we issue a "kthread_stop" from the module_exit code.In the thread function we repeatedly check for "kthread_should_stop" and when the condition is met (due to the kthread_stop call) we "return 0;". Our thread function wouldn't return in any other scenario.
Our problem right now is that when we do an "rmmod" the system just hangs!.This we have identified is due to the kthread_stop. Can you please give us some pointers/directions regarding the possible underlying issue.Specifically is there a problem while calling kthread_stop and waiting on the thread completion in the module exit code.
Thanks and Regards Ganesh
| |