linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] percpu: stop leaking bitmap metadata blocks
@ 2018-10-07  8:31 Mike Rapoport
  2018-10-07 22:09 ` Dennis Zhou
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Rapoport @ 2018-10-07  8:31 UTC (permalink / raw)
  To: Dennis Zhou
  Cc: Tejun Heo, Christoph Lameter, Roman Gushchin, linux-mm,
	linux-kernel, Mike Rapoport, stable

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 <rppt@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
---
 mm/percpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/percpu.c b/mm/percpu.c
index d21cb13..25104cd 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -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);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] percpu: stop leaking bitmap metadata blocks
  2018-10-07  8:31 [PATCH] percpu: stop leaking bitmap metadata blocks Mike Rapoport
@ 2018-10-07 22:09 ` Dennis Zhou
  0 siblings, 0 replies; 2+ messages in thread
From: Dennis Zhou @ 2018-10-07 22:09 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Dennis Zhou, Tejun Heo, Christoph Lameter, Roman Gushchin,
	linux-mm, linux-kernel, stable

Hi Mike,

On Sun, Oct 07, 2018 at 11:31:51AM +0300, Mike Rapoport wrote:
> 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 <rppt@linux.vnet.ibm.com>
> Cc: stable@vger.kernel.org
> ---
>  mm/percpu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/percpu.c b/mm/percpu.c
> index d21cb13..25104cd 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -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);

Ah a bit of a boneheaded miss on my part.. Thanks for catching this!
I've applied it to for-4.19-fixes.

Thanks,
Dennis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-07 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07  8:31 [PATCH] percpu: stop leaking bitmap metadata blocks Mike Rapoport
2018-10-07 22:09 ` Dennis Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).