[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd4d0dba-6818-12df-1d90-3ef5121e342f@windriver.com>
Date: Fri, 22 Oct 2021 19:03:42 +0800
From: Quanyang Wang <quanyang.wang@...driver.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Ming Lei <ming.lei@...hat.com>, Tejun Heo <tj@...nel.org>,
Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Jens Axboe <axboe@...nel.dk>, Roman Gushchin <guro@...com>,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [V2][PATCH] cgroup: fix memory leak caused by missing
cgroup_bpf_offline
Hi Michal,
On 10/21/21 1:28 AM, Michal Koutný wrote:
> On Wed, Oct 20, 2021 at 01:22:06PM +0800, Quanyang Wang <quanyang.wang@...driver.com> wrote:
>>> If only precpu_ref data is leaked, it is fine to add "Fixes: 2b0d3d3e4fcf",
>>> I thought cgroup_bpf_release() needs to release more for root cgroup, but
>>> looks not true.
>> For now, I can only observe that precpu_ref data is leaked when running ltp
>> testsuite.
>
> I assume you refer to ref->data. I considered the ref->percpu_count_ptr
> allocated with __alloc_percpu_gfp(). Could it be that kmemleak won't
> detect leaked percpu allocations?
Yes, kmemleak can't detect percpu allocations. I find some message about
this:
commit f528f0b8e53d
Author: Catalin Marinas <catalin.marinas@....com>
Date: Mon Sep 26 17:12:53 2011 +0100
kmemleak: Handle percpu memory allocation
This patch adds kmemleak callbacks from the percpu allocator, reducing a
number of false positives caused by kmemleak not scanning such memory
blocks. The percpu chunks are never reported as leaks because of current
kmemleak limitations with the __percpu pointer not pointing directly to
the actual chunks.
Thanks,
Quanyang
>
> (The patch you sent resolves this as well, I'm just curious.)
>
> Michal
>
Powered by blists - more mailing lists