From: Paul E. McKenney Date: Sat, 25 Aug 2012 22:27:40 +0000 (-0700) Subject: rcu: Prevent initialization race in rcutorture kthreads X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~101^2~1^2~2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60f53782c51f27c695840ce90c6c432284319eef;p=pandora-kernel.git 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 Signed-off-by: Paul E. McKenney --- Reading git-diff-tree failed