File tree Expand file tree Collapse file tree 3 files changed +34
-5
lines changed Expand file tree Collapse file tree 3 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ __bpf_kfunc void bpf_cpumask_release(struct bpf_cpumask *cpumask)
96
96
migrate_enable ();
97
97
}
98
98
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
+
99
105
/**
100
106
* bpf_cpumask_first() - Get the index of the first nonzero bit in the cpumask.
101
107
* @cpumask: The cpumask being queried.
@@ -453,7 +459,7 @@ static const struct btf_kfunc_id_set cpumask_kfunc_set = {
453
459
454
460
BTF_ID_LIST (cpumask_dtor_ids )
455
461
BTF_ID (struct , bpf_cpumask )
456
- BTF_ID (func , bpf_cpumask_release )
462
+ BTF_ID (func , bpf_cpumask_release_dtor )
457
463
458
464
static int __init cpumask_kfunc_init (void )
459
465
{
Original file line number Diff line number Diff line change @@ -2150,6 +2150,12 @@ __bpf_kfunc void bpf_task_release(struct task_struct *p)
2150
2150
put_task_struct_rcu_user (p );
2151
2151
}
2152
2152
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
+
2153
2159
#ifdef CONFIG_CGROUPS
2154
2160
/**
2155
2161
* 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)
2174
2180
cgroup_put (cgrp );
2175
2181
}
2176
2182
2183
+ __bpf_kfunc void bpf_cgroup_release_dtor (void * cgrp )
2184
+ {
2185
+ cgroup_put (cgrp );
2186
+ }
2187
+ CFI_NOSEAL (bpf_cgroup_release_dtor );
2188
+
2177
2189
/**
2178
2190
* bpf_cgroup_ancestor - Perform a lookup on an entry in a cgroup's ancestor
2179
2191
* 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 = {
2570
2582
2571
2583
BTF_ID_LIST (generic_dtor_ids )
2572
2584
BTF_ID (struct , task_struct )
2573
- BTF_ID (func , bpf_task_release )
2585
+ BTF_ID (func , bpf_task_release_dtor )
2574
2586
#ifdef CONFIG_CGROUPS
2575
2587
BTF_ID (struct , cgroup )
2576
- BTF_ID (func , bpf_cgroup_release )
2588
+ BTF_ID (func , bpf_cgroup_release_dtor )
2577
2589
#endif
2578
2590
2579
2591
BTF_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)
600
600
refcount_dec (& p -> cnt );
601
601
}
602
602
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
+
603
609
__bpf_kfunc void bpf_kfunc_call_memb_release (struct prog_test_member * p )
604
610
{
605
611
}
606
612
613
+ __bpf_kfunc void bpf_kfunc_call_memb_release_dtor (void * p )
614
+ {
615
+ }
616
+ CFI_NOSEAL (bpf_kfunc_call_memb_release_dtor );
617
+
607
618
__bpf_kfunc_end_defs ();
608
619
609
620
BTF_SET8_START (bpf_test_modify_return_ids )
@@ -1671,9 +1682,9 @@ static const struct btf_kfunc_id_set bpf_prog_test_kfunc_set = {
1671
1682
1672
1683
BTF_ID_LIST (bpf_prog_test_dtor_kfunc_ids )
1673
1684
BTF_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 )
1675
1686
BTF_ID (struct , prog_test_member )
1676
- BTF_ID (func , bpf_kfunc_call_memb_release )
1687
+ BTF_ID (func , bpf_kfunc_call_memb_release_dtor )
1677
1688
1678
1689
static int __init bpf_prog_test_run_init (void )
1679
1690
{
You can’t perform that action at this time.
0 commit comments