diff options
author | Tejun Heo <tj@kernel.org> | 2016-05-25 11:48:25 -0400 |
---|---|---|
committer | Min Chong <mchong@google.com> | 2016-10-06 21:45:33 -0700 |
commit | 3b41e21ffaa38ff8ed8fa8b71f4410f45f42011f (patch) | |
tree | 65311bd95b1477a4732038832254eb838a368083 /arch/c6x | |
parent | 077d045666866063087a1e71e5e82ede3e139d96 (diff) |
UPSTREAM: percpu: fix synchronization between synchronous map extension and chunk destruction
(cherry picked from 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")
Change-Id: I8800962e658e78eac866fff4a4e00294c58a3dec
Bug: 31596597
Diffstat (limited to 'arch/c6x')
0 files changed, 0 insertions, 0 deletions