Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d4028fe authored by Tejun Heo's avatar Tejun Heo Committed by Dennis Cagle
Browse files

percpu: fix synchronization between chunk->map_extend_work and chunk destruction



Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work.  pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end up freeing the chunk while the work
item is still in flight.

This patch fixes the bug by rolling async map extension operations
into pcpu_balance_work.

Change-Id: Id41817a5c5f2c9ed9b19022df0c0ff7daacf6a71
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-and-tested-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
Reported-by: default avatarVlastimil Babka <vbabka@suse.cz>
Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
Cc: stable@vger.kernel.org # v3.18+
Fixes: 9c824b6a ("percpu: make sure chunk->map array has available space")
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git


Git-commit: 4f996e234dad488e5d9ba0858bc1bae12eff82c3
Signed-off-by: default avatarDennis Cagle <d-cagle@codeaurora.org>
parent aefc8c03
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment