aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse-vmemmap.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2012-09-02 00:28:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 09:47:40 -0700
commitbc713e264ea9badd399aa34f208154a64e4e1b3b (patch)
tree8117073e57c8c6abb8a26a6ee66b7a098ecd289f /mm/sparse-vmemmap.c
parente2471ec3e86a473ec354b4707e8e2d2367d1af00 (diff)
downloadkernel_samsung_smdk4412-bc713e264ea9badd399aa34f208154a64e4e1b3b.zip
kernel_samsung_smdk4412-bc713e264ea9badd399aa34f208154a64e4e1b3b.tar.gz
kernel_samsung_smdk4412-bc713e264ea9badd399aa34f208154a64e4e1b3b.tar.bz2
workqueue: UNBOUND -> REBIND morphing in rebind_workers() should be atomic
commit 96e65306b81351b656835c15931d1d237b252f27 upstream. The compiler may compile the following code into TWO write/modify instructions. worker->flags &= ~WORKER_UNBOUND; worker->flags |= WORKER_REBIND; so the other CPU may temporarily see worker->flags which doesn't have either WORKER_UNBOUND or WORKER_REBIND set and perform local wakeup prematurely. Fix it by using single explicit assignment via ACCESS_ONCE(). Because idle workers have another WORKER_NOT_RUNNING flag, this bug doesn't exist for them; however, update it to use the same pattern for consistency. tj: Applied the change to idle workers too and updated comments and patch description a bit. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/sparse-vmemmap.c')
0 files changed, 0 insertions, 0 deletions