File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ __bpf_kfunc void bpf_cpumask_release(struct bpf_cpumask *cpumask)
9696 migrate_enable ();
9797}
9898
99+ __bpf_kfunc void bpf_cpumask_release_dtor (void * cpumask )
100+ {
101+ bpf_cpumask_release (cpumask );
102+ }
103+ CFI_NOSEAL (bpf_cpumask_release_dtor );
104+
99105/**
100106 * bpf_cpumask_first() - Get the index of the first nonzero bit in the cpumask.
101107 * @cpumask: The cpumask being queried.
@@ -453,7 +459,7 @@ static const struct btf_kfunc_id_set cpumask_kfunc_set = {
453459
454460BTF_ID_LIST (cpumask_dtor_ids )
455461BTF_ID (struct , bpf_cpumask )
456- BTF_ID (func , bpf_cpumask_release )
462+ BTF_ID (func , bpf_cpumask_release_dtor )
457463
458464static int __init cpumask_kfunc_init (void )
459465{
Original file line number Diff line number Diff line change @@ -2150,6 +2150,12 @@ __bpf_kfunc void bpf_task_release(struct task_struct *p)
21502150 put_task_struct_rcu_user (p );
21512151}
21522152
2153+ __bpf_kfunc void bpf_task_release_dtor (void * p )
2154+ {
2155+ put_task_struct_rcu_user (p );
2156+ }
2157+ CFI_NOSEAL (bpf_task_release_dtor );
2158+
21532159#ifdef CONFIG_CGROUPS
21542160/**
21552161 * bpf_cgroup_acquire - Acquire a reference to a cgroup. A cgroup acquired by
@@ -2174,6 +2180,12 @@ __bpf_kfunc void bpf_cgroup_release(struct cgroup *cgrp)
21742180 cgroup_put (cgrp );
21752181}
21762182
2183+ __bpf_kfunc void bpf_cgroup_release_dtor (void * cgrp )
2184+ {
2185+ cgroup_put (cgrp );
2186+ }
2187+ CFI_NOSEAL (bpf_cgroup_release_dtor );
2188+
21772189/**
21782190 * bpf_cgroup_ancestor - Perform a lookup on an entry in a cgroup's ancestor
21792191 * array. A cgroup returned by this kfunc which is not subsequently stored in a
@@ -2570,10 +2582,10 @@ static const struct btf_kfunc_id_set generic_kfunc_set = {
25702582
25712583BTF_ID_LIST (generic_dtor_ids )
25722584BTF_ID (struct , task_struct )
2573- BTF_ID (func , bpf_task_release )
2585+ BTF_ID (func , bpf_task_release_dtor )
25742586#ifdef CONFIG_CGROUPS
25752587BTF_ID (struct , cgroup )
2576- BTF_ID (func , bpf_cgroup_release )
2588+ BTF_ID (func , bpf_cgroup_release_dtor )
25772589#endif
25782590
25792591BTF_SET8_START (common_btf_ids )
Original file line number Diff line number Diff line change @@ -600,10 +600,21 @@ __bpf_kfunc void bpf_kfunc_call_test_release(struct prog_test_ref_kfunc *p)
600600 refcount_dec (& p -> cnt );
601601}
602602
603+ __bpf_kfunc void bpf_kfunc_call_test_release_dtor (void * p )
604+ {
605+ bpf_kfunc_call_test_release (p );
606+ }
607+ CFI_NOSEAL (bpf_kfunc_call_test_release_dtor );
608+
603609__bpf_kfunc void bpf_kfunc_call_memb_release (struct prog_test_member * p )
604610{
605611}
606612
613+ __bpf_kfunc void bpf_kfunc_call_memb_release_dtor (void * p )
614+ {
615+ }
616+ CFI_NOSEAL (bpf_kfunc_call_memb_release_dtor );
617+
607618__bpf_kfunc_end_defs ();
608619
609620BTF_SET8_START (bpf_test_modify_return_ids )
@@ -1671,9 +1682,9 @@ static const struct btf_kfunc_id_set bpf_prog_test_kfunc_set = {
16711682
16721683BTF_ID_LIST (bpf_prog_test_dtor_kfunc_ids )
16731684BTF_ID (struct , prog_test_ref_kfunc )
1674- BTF_ID (func , bpf_kfunc_call_test_release )
1685+ BTF_ID (func , bpf_kfunc_call_test_release_dtor )
16751686BTF_ID (struct , prog_test_member )
1676- BTF_ID (func , bpf_kfunc_call_memb_release )
1687+ BTF_ID (func , bpf_kfunc_call_memb_release_dtor )
16771688
16781689static int __init bpf_prog_test_run_init (void )
16791690{
You can’t perform that action at this time.
0 commit comments