• Tejun Heo's avatar
    percpu: fix pcpu_reclaim() locking · 971f3918
    Tejun Heo authored
    pcpu_reclaim() calls pcpu_depopulate_chunk() which makes use of pages
    array and bitmap returned by pcpu_get_pages_and_bitmap() and thus
    should be called under pcpu_alloc_mutex.  pcpu_reclaim() released the
    mutex before calling depopulate leading to double free and other
    strange problems caused by the unexpected concurrent usages of pages
    array and bitmap.  Fix it.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
    971f3918
percpu.c 58.9 KB