Ignore the (real) leak report in context_struct_to_string From: Catalin Marinas This might be a real leak but, because of the amount of information kmemleak reports, we ignore it for now to allow testing of other parts of kmemleak. Signed-off-by: Catalin Marinas --- security/selinux/ss/services.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index d2e80e6..f8cf098 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -548,6 +548,9 @@ static int context_struct_to_string(stru /* Allocate space for the context; caller must free this space. */ scontextp = kmalloc(*scontext_len, GFP_ATOMIC); + /* This might be a real leak but we ignore it for now to allow + * testing other parts of kmemleak */ + memleak_not_leak(scontextp); if (!scontextp) { return -ENOMEM; }