Skip to content

Commit

Permalink
percpu: stop leaking bitmap metadata blocks
Browse files Browse the repository at this point in the history
The commit ca460b3 ("percpu: introduce bitmap metadata blocks")
introduced bitmap metadata blocks. These metadata blocks are allocated
whenever a new chunk is created, but they are never freed. Fix it.

Fixes: ca460b3 ("percpu: introduce bitmap metadata blocks")
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dennis Zhou <dennis@kernel.org>
  • Loading branch information
Mike Rapoport authored and Dennis Zhou committed Oct 7, 2018
1 parent 0238df6 commit 6685b35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ static void pcpu_free_chunk(struct pcpu_chunk *chunk)
{
if (!chunk)
return;
pcpu_mem_free(chunk->md_blocks);
pcpu_mem_free(chunk->bound_map);
pcpu_mem_free(chunk->alloc_map);
pcpu_mem_free(chunk);
Expand Down

0 comments on commit 6685b35

Please sign in to comment.