cgroup: cgroup refcnt functions should be exported when CONFIG_DEBUG_CGROUP_REF
authorTejun Heo <tj@kernel.org>
Mon, 31 Oct 2022 17:12:13 +0000 (07:12 -1000)
committerTejun Heo <tj@kernel.org>
Mon, 31 Oct 2022 17:12:13 +0000 (07:12 -1000)
commit79a7f41f7f5ac69fd22eaf1fb3e230bea95f3399
treeafb5337317b4a5e1151852f3b1feb5d98ac0b92f
parent6ab428604f724cf217a47b7d3f3353aab815b40e
cgroup: cgroup refcnt functions should be exported when CONFIG_DEBUG_CGROUP_REF

6ab428604f72 ("cgroup: Implement DEBUG_CGROUP_REF") added a config option
which forces cgroup refcnt functions to be not inlined so that they can be
kprobed for debugging. However, it forgot export them when the config is
enabled breaking modules which make use of css reference counting.

Fix it by adding CGROUP_REF_EXPORT() macro to cgroup_refcnt.h which is
defined to EXPORT_SYMBOL_GPL when CONFIG_DEBUG_CGROUP_REF is set.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 6ab428604f72 ("cgroup: Implement DEBUG_CGROUP_REF")
include/linux/cgroup.h
include/linux/cgroup_refcnt.h
kernel/cgroup/cgroup.c