Messages in this thread | | | Date | Wed, 9 Jan 2019 11:31:26 +0000 | From | Catalin Marinas <> | Subject | Re: [PATCH] selinux: avc: mark avc node as not a leak |
| |
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
| |