selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Prateek Patel <prpatel@nvidia.com>
Cc: paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org,
	linux-kernel@vger.kernel.org, selinux@vger.kernel.org,
	linux-tegra@vger.kernel.org, talho@nvidia.com,
	swarren@nvidia.com, linux-mm@kvack.org, snikam@nvidia.com,
	vdumpa@nvidia.com, Sri Krishna chowdary <schowdary@nvidia.com>
Subject: Re: [PATCH] selinux: avc: mark avc node as not a leak
Date: Wed, 9 Jan 2019 11:31:26 +0000	[thread overview]
Message-ID: <20190109113126.nzpmb7xx4xqtn37w@mbp> (raw)
In-Reply-To: <1547023162-6381-1-git-send-email-prpatel@nvidia.com>

Hi Prateek,

On Wed, Jan 09, 2019 at 02:09:22PM +0530, Prateek Patel wrote:
> From: Sri Krishna chowdary <schowdary@nvidia.com>
> 
> kmemleak detects allocated objects as leaks if not accessed for
> default scan time. The memory allocated using avc_alloc_node
> is freed using rcu mechanism when nodes are reclaimed or on
> avc_flush. So, there is no real leak here and kmemleak_scan
> detects it as a leak which is false positive. Hence, mark it as
> kmemleak_not_leak.

In theory, kmemleak should detect the node->rhead in the lists used by
call_rcu() and not report it as a leak. Which RCU options do you have
enabled (just to check whether kmemleak tracks the RCU internal lists)?

Also, does this leak eventually disappear without your patch? Does

  echo dump=0xffffffc0dd1a0e60 > /sys/kernel/debug/kmemleak

still display this object?

Thanks.

-- 
Catalin

  reply	other threads:[~2019-01-09 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09  8:39 [PATCH] selinux: avc: mark avc node as not a leak Prateek Patel
2019-01-09 11:31 ` Catalin Marinas [this message]
2019-01-24 21:56   ` Prateek Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190109113126.nzpmb7xx4xqtn37w@mbp \
    --to=catalin.marinas@arm.com \
    --cc=eparis@parisplace.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=prpatel@nvidia.com \
    --cc=schowdary@nvidia.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.org \
    --cc=snikam@nvidia.com \
    --cc=swarren@nvidia.com \
    --cc=talho@nvidia.com \
    --cc=vdumpa@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).