[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7DEA68BC-3B9A-46FA-8103-AE6B72324591@lca.pw>
Date: Sun, 21 Jun 2020 19:53:23 -0400
From: Qian Cai <cai@....pw>
To: Roman Gushchin <guro@...com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Shakeel Butt <shakeelb@...gle.com>, linux-mm@...ck.org,
Vlastimil Babka <vbabka@...e.cz>, kernel-team@...com,
linux-kernel@...r.kernel.org, catalin.marinas@....com
Subject: Re: [PATCH v6 00/19] The new cgroup slab memory controller
> On Jun 21, 2020, at 7:34 PM, Roman Gushchin <guro@...com> wrote:
>
> My wild guess is that kmemleak is getting confused by modifying the lowest
> bit of page->mem_cgroup/obhj_cgroups pointer:
>
> struct page {
> ...
> union {
> struct mem_cgroup *mem_cgroup;
> struct obj_cgroup **obj_cgroups;
> };
> ...
> }
>
> We're using the lowest bit to distinguish between a "normal" mem_cgroup
> pointer and a vector of obj_cgroup pointers.
>
> This pointer to obj_cgroup vector is saved only here, so if we're modifying
> the address, I guess it's what makes kmemleak think that there is a leak.
>
> Or do you have a real leak?
The point is that we can’t have a patchset in the current form to totally render kmemleak useless with so many even false positives.
Anyway, this is rather easy to reproduce where I am able to reproduce on multiple bare-metal machines by just booting it.
# echo scan > /sys/kernel/debug/kmemleak
# cat /sys/kernel/debug/kmemleak
Powered by blists - more mailing lists