From: Mike Rapoport Date: Sun, 7 Oct 2018 08:31:51 +0000 (+0300) Subject: percpu: stop leaking bitmap metadata blocks X-Git-Tag: v4.14.77~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54886c97839732650f0aabb90e674cad791e82c0;p=platform%2Fkernel%2Flinux-exynos.git percpu: stop leaking bitmap metadata blocks commit 6685b357363bfe295e3ae73665014db4aed62c58 upstream. The commit ca460b3c9627 ("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: ca460b3c9627 ("percpu: introduce bitmap metadata blocks") Signed-off-by: Mike Rapoport Cc: stable@vger.kernel.org Signed-off-by: Dennis Zhou Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/percpu.c b/mm/percpu.c index 5fa5e79..3074148 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1208,6 +1208,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);