diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-08-26 00:27:40 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-09-23 16:42:23 +0200 |
commit | 60f53782c51f27c695840ce90c6c432284319eef (patch) | |
tree | daf20b20a35f09ecfa214127cf3c676f12c4edd1 /kernel/rcutree_plugin.h | |
parent | rcu: Switch rcutorture to pr_alert() and friends (diff) | |
download | linux-60f53782c51f27c695840ce90c6c432284319eef.tar.xz linux-60f53782c51f27c695840ce90c6c432284319eef.zip |
rcu: Prevent initialization race in rcutorture kthreads
When you do something like "t = kthread_run(...)", it is possible that
the kthread will start running before the assignment to "t" happens.
If the child kthread expects to find a pointer to its task_struct in "t",
it will then be fatally disappointed. This commit therefore switches
such cases to kthread_create() followed by wake_up_process(), guaranteeing
that the assignment happens before the child kthread starts running.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree_plugin.h')
0 files changed, 0 insertions, 0 deletions