acrn-kernel/kernel/rcu
Catalin Marinas ddf42b7c8d rcu: kmemleak: Ignore kmemleak false positives when RCU-freeing objects
commit 5f98fd034ca6fd1ab8c91a3488968a0e9caaabf6 upstream.

Since the actual slab freeing is deferred when calling kvfree_rcu(), so
is the kmemleak_free() callback informing kmemleak of the object
deletion. From the perspective of the kvfree_rcu() caller, the object is
freed and it may remove any references to it. Since kmemleak does not
scan RCU internal data storing the pointer, it will report such objects
as leaks during the grace period.

Tell kmemleak to ignore such objects on the kvfree_call_rcu() path. Note
that the tiny RCU implementation does not have such issue since the
objects can be tracked from the rcu_ctrlblk structure.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Christoph Paasch <cpaasch@apple.com>
Closes: https://lore.kernel.org/all/F903A825-F05F-4B77-A2B5-7356282FBA2C@apple.com/
Cc: <stable@vger.kernel.org>
Tested-by: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:07:12 +00:00
..
Kconfig
Kconfig.debug
Makefile
rcu.h
rcu_segcblist.c
rcu_segcblist.h
rcuscale.c
rcutorture.c
refscale.c
srcutiny.c
srcutree.c
sync.c
tasks.h
tiny.c
tree.c rcu: kmemleak: Ignore kmemleak false positives when RCU-freeing objects 2023-11-28 17:07:12 +00:00
tree.h rcu/tree: Defer setting of jiffies during stall reset 2023-11-28 17:07:11 +00:00
tree_exp.h
tree_nocb.h
tree_plugin.h
tree_stall.h rcu/tree: Defer setting of jiffies during stall reset 2023-11-28 17:07:11 +00:00
update.c