lkml.org 
[lkml]   [2016]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] userns: suppress kmemleak message
On Thu, Nov 3, 2016 at 3:54 PM, Eric W. Biederman <ebiederm@xmission.com> 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.

The only alternative I see is to use WRITE_ONCE() instead of "=" to
set "user_header" such that the compiler cannot optimize that variable
away. Which of these two approaches do you prefer?

Fubo.

\
 
 \ /
  Last update: 2016-12-15 13:17    [W:2.671 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site