summaryrefslogtreecommitdiffstats
path: root/firmware/ositech
diff options
context:
space:
mode:
authorDaniel J Blueman <daniel.blueman@gmail.com>2010-06-01 15:06:13 +0200
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-06-23 15:50:44 +0200
commitf3b577dec1f2ce32d2db6d2ca6badff7002512af (patch)
treec9d5d84b2d3e4ae1251f69932a526367a2bac7fa /firmware/ositech
parentLinux 2.6.35-rc3 (diff)
downloadlinux-f3b577dec1f2ce32d2db6d2ca6badff7002512af.tar.xz
linux-f3b577dec1f2ce32d2db6d2ca6badff7002512af.zip
rcu: apply RCU protection to wake_affine()
The task_group() function returns a pointer that must be protected by either RCU, the ->alloc_lock, or the cgroup lock (see the rcu_dereference_check() in task_subsys_state(), which is invoked by task_group()). The wake_affine() function currently does none of these, which means that a concurrent update would be within its rights to free the structure returned by task_group(). Because wake_affine() uses this structure only to compute load-balancing heuristics, there is no reason to acquire either of the two locks. Therefore, this commit introduces an RCU read-side critical section that starts before the first call to task_group() and ends after the last use of the "tg" pointer returned from task_group(). Thanks to Li Zefan for pointing out the need to extend the RCU read-side critical section from that proposed by the original patch. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'firmware/ositech')
0 files changed, 0 insertions, 0 deletions