Commit 6685b357 authored by Mike Rapoport's avatar Mike Rapoport Committed by Dennis Zhou

percpu: stop leaking bitmap metadata blocks

The commit ca460b3c ("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: ca460b3c ("percpu: introduce bitmap metadata blocks")
Signed-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
parent 0238df64
...@@ -1212,6 +1212,7 @@ static void pcpu_free_chunk(struct pcpu_chunk *chunk) ...@@ -1212,6 +1212,7 @@ static void pcpu_free_chunk(struct pcpu_chunk *chunk)
{ {
if (!chunk) if (!chunk)
return; return;
pcpu_mem_free(chunk->md_blocks);
pcpu_mem_free(chunk->bound_map); pcpu_mem_free(chunk->bound_map);
pcpu_mem_free(chunk->alloc_map); pcpu_mem_free(chunk->alloc_map);
pcpu_mem_free(chunk); pcpu_mem_free(chunk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment