Tejun Heo 4f996e234d 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.

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: 9c824b6a172c ("percpu: make sure chunk->map array has available space")
2016-05-25 11:48:25 -04:00
..
2015-11-05 19:34:48 -08:00
2015-06-24 17:49:45 -07:00
2016-05-23 11:18:01 -07:00
2016-05-23 11:18:01 -07:00
2016-05-23 17:04:14 -07:00
2016-03-17 15:09:34 -07:00
2015-09-08 15:35:28 -07:00
2016-05-23 17:04:14 -07:00
2016-03-17 15:09:34 -07:00
2015-11-05 19:34:48 -08:00
2016-05-23 17:04:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-23 17:04:14 -07:00
2016-05-20 17:58:30 -07:00