[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220427224134.yurrplclbhmnrloj@revolver>
Date: Wed, 27 Apr 2022 22:41:41 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Qian Cai <quic_qiancai@...cinc.com>
CC: "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Yu Zhao <yuzhao@...gle.com>
Subject: Re: [PATCH v8 00/70] Introducing the Maple Tree
* Qian Cai <quic_qiancai@...cinc.com> [220427 16:22]:
> On Wed, Apr 27, 2022 at 04:51:50PM +0000, Liam Howlett wrote:
> > Thanks. This is indeed an issue with 0d43186b36c1 (mm/mlock: use vma
> > iterator and instead of vma linked list)
> >
> > Andrew, Please include this patch as a fix.
>
> Even with the patch applied, there are still thousands of memory leaks
> reports from kmemleak after booting.
Thank you for finding this.
>
> unreferenced object 0xffff400259bd6d00 (size 256):
> comm "multipathd", pid 2577, jiffies 4294915929 (age 2370.384s)
> hex dump (first 32 bytes):
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> backtrace:
> slab_post_alloc_hook
> kmem_cache_alloc_bulk
> mas_alloc_nodes
> mt_alloc_bulk at lib/maple_tree.c:151
> (inlined by) mas_alloc_nodes at lib/maple_tree.c:1244
> mas_preallocate
> __vma_adjust
> shift_arg_pages
> setup_arg_pages
> load_elf_binary
> search_binary_handler
> exec_binprm
> bprm_execve
> do_execveat_common.isra.0
> __arm64_sys_execve
> invoke_syscall
> el0_svc_common.constprop.0
> do_el0_svc
__vma_adjust is way too complicated. This patch should fix the leak.
Andrew, please add this patch to "mm: start tracking VMAs with maple tree"
Thanks,
Liam
View attachment "0001-mm-mmap-Fix-__vma_adjust-memory-leak.patch" of type "text/x-diff" (877 bytes)
Powered by blists - more mailing lists