ref_tracker: do xarray and workqueue job initializations earlier
authorJeff Layton <jlayton@kernel.org>
Thu, 26 Jun 2025 12:52:14 +0000 (08:52 -0400)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Jun 2025 20:20:29 +0000 (13:20 -0700)
commitf4e6aefb9c6d8f9a5baa2a26bddaff4fbb4d280e
tree3c878f3843ee1219b769706f8bcef51bed035b0c
parent707bd05be75f65749c3f1695f4e362a89b3fcc7b
ref_tracker: do xarray and workqueue job initializations earlier

The kernel test robot reported an oops that occurred when attempting to
deregister a dentry from the xarray during subsys_initcall().

The ref_tracker xarrays and workqueue job are being initialized in
late_initcall() which is too late. Move those to postcore_initcall()
instead.

Fixes: 65b584f53611 ("ref_tracker: automatically register a file in debugfs for a ref_tracker_dir")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202506251406.c28f2adb-lkp@intel.com
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250626-reftrack-dbgfs-v1-1-812102e2a394@kernel.org
lib/ref_tracker.c