summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-05-25 11:48:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-27 09:47:33 -0700
commit3bb1138e7760404fb801f0b656f85d2fcfc2c39d (patch)
tree36eb1386049c1efcfbe42479430aa8c76d51026d /fs/btrfs
parentc26ae537f16f653c2541df9e338013653fc3fcc7 (diff)
percpu: fix synchronization between synchronous map extension and chunk destruction
commit 6710e594f71ccaad8101bc64321152af7cd9ea28 upstream. 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> Fixes: 1a4d76076cda ("percpu: implement asynchronous chunk population") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs')
0 files changed, 0 insertions, 0 deletions