lkml.org 
[lkml]   [2020]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 00/19] The new cgroup slab memory controller
Date


> On Jun 21, 2020, at 7:34 PM, Roman Gushchin <guro@fb.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
\
 
 \ /
  Last update: 2020-06-22 01:55    [W:0.235 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site