Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1514597

Re: [PATCH] userns: suppress kmemleak message

From Jakub Kicinski <kubakici@wp.pl>
Newsgroups linux.kernel
Subject Re: [PATCH] userns: suppress kmemleak message
Date 2016-11-03 16:10 +0100
Message-ID <szrOq-5vm-31@gated-at.bofh.it> (permalink)
References <szj4t-8aX-3@gated-at.bofh.it> <szrEP-5cN-53@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 03 Nov 2016 09:54:25 -0500, Eric W. Biederman wrote:
> Dmitry Torokhov <dmitry.torokhov@gmail.com> writes:
> 
> > We do not ever intend to unregister "user" sysctl table, unfortunately
> > it leads kmemleak to believe that we are leaking memory:  
> 
> Sounds like an issue with kmemleak because we do retain references.
> 
> So no we don't intend to unregister the table.
> 
> As for the patch.
> 
> Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 
> I can't see the using kmemleak_not_leak is possibly good form.  I
> would much rather have suggestions about constructs that won't confuse
> kmemleak and won't need ugly annotations that serve no purpose but to
> appease a tool.  Perhaps the user_header variable needs to be moved out
> of user_namespace_sysctl_init.

FWIW the problem now is that the compiler is clever enough to never
write the pointer to memory so kmemleak can't find it.  user_header is
just held in a register for as long as it's needed even though the
variable is static.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] userns: suppress kmemleak message Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-11-03 06:50 +0100
  Re: [PATCH] userns: suppress kmemleak message Jakub Kicinski <jakub.kicinski@netronome.com> - 2016-11-03 15:10 +0100
  Re: [PATCH] userns: suppress kmemleak message ebiederm@xmission.com (Eric W. Biederman) - 2016-11-03 16:00 +0100
    Re: [PATCH] userns: suppress kmemleak message Jakub Kicinski <kubakici@wp.pl> - 2016-11-03 16:10 +0100

csiph-web