aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-05-25 11:48:25 -0400
committerSasha Levin <sasha.levin@oracle.com>2016-07-11 10:20:46 -0400
commit664646c5863e13607733f29891d655a51f5ab3ff (patch)
tree7ab99dc97a56d91ec0379a97f02063857c8b3c7b /drivers
parent9e9f68827d7eb85c39503457a37a5dced178f6f4 (diff)
percpu: fix synchronization between synchronous map extension and chunk destruction
[ Upstream commit 6710e594f71ccaad8101bc64321152af7cd9ea28 ] For non-atomic allocations, pcpu_alloc() can try to extend the area map synchronously after dropping pcpu_lock; however, the extension wasn't synchronized against chunk destruction and the chunk might get freed while extension is in progress. This patch fixes the bug by putting most of non-atomic allocations under pcpu_alloc_mutex to synchronize against pcpu_balance_work which is responsible for async chunk management including destruction. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-and-tested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Reported-by: Vlastimil Babka <vbabka@suse.cz> Reported-by: Sasha Levin <sasha.levin@oracle.com> Cc: stable@vger.kernel.org # v3.18+ Fixes: 1a4d76076cda ("percpu: implement asynchronous chunk population") Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions