]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
refperf: Set reader_tasks to NULL after kfree()
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>
Thu, 11 Sep 2025 03:18:11 +0000 (08:48 +0530)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 15 Sep 2025 12:20:09 +0000 (05:20 -0700)
commit1441edd129e36cf5d1a9c2abff39619d5d90e1a8
tree73736489aa4143f554c3efeedbb570f73a6dcba1
parentfb7855a6b58b045f60a7456096da29842e9ca079
refperf: Set reader_tasks to NULL after kfree()

Set reader_tasks to NULL after kfree() in ref_scale_cleanup() to
improve debugging experience with kernel debugging tools. This
follows the common pattern of NULLing pointers after freeing to
avoid dangling pointer issues during debugging sessions.

Setting pointers to NULL after freeing helps debugging tools like
kdgb,drgn, and other kernel debuggers by providing clear indication
that the memory has been freed and the pointer is no longer valid.

Suggested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/refscale.c