lkml.org 
[lkml]   [2017]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/4] seccomp: Add sysctl to display available actions
On Mon, Feb 13, 2017 at 4:25 PM, Tyler Hicks <tyhicks@canonical.com> wrote:
> kmemleak doesn't complain if we save it to a global. That makes sense
> because it means that we have a persistent reference to the allocated
> memory.
>
> However, kmemleak doesn't complain about this allocation as-is (meaning
> that I simply removed the call to kmemleak_not_leak()). From what I can
> tell, this is because a reference to the allocated ctl_table_header
> struct is saved when __register_sysctl_table() calls init_header(). I
> think kmemleak is seeing this reference when doing scans and
> (incorrectly) thinking that there's no leak.
>
> I think the safest/cleanest thing to do is leave the call to
> kmemleak_not_leak(). Let me know if you disagree.

Okay, that's cool. :) Thanks for checking!

-Kees

--
Kees Cook
Pixel Security

\
 
 \ /
  Last update: 2017-02-14 01:27    [W:0.071 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site