diff options
author | Tejun Heo <tj@kernel.org> | 2022-10-31 07:12:13 -1000 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-10-31 07:12:13 -1000 |
commit | 79a7f41f7f5ac69fd22eaf1fb3e230bea95f3399 (patch) | |
tree | afb5337317b4a5e1151852f3b1feb5d98ac0b92f /kernel/cgroup | |
parent | 6ab428604f724cf217a47b7d3f3353aab815b40e (diff) |
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")
Diffstat (limited to 'kernel/cgroup')
-rw-r--r-- | kernel/cgroup/cgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index f786c4c973a0..f2743a476190 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -250,6 +250,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css, #ifdef CONFIG_DEBUG_CGROUP_REF #define CGROUP_REF_FN_ATTRS noinline +#define CGROUP_REF_EXPORT(fn) EXPORT_SYMBOL_GPL(fn); #include <linux/cgroup_refcnt.h> #endif |