[PATCH bpf-next v1] bpf,arena: Rename the kfunc set variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename the kfunc set variable to specify the 'arena' function scope,
although the 'UNSPEC' type BPF program is mapped to 'COMMON' hook.

And there is 'common_kfunc_set' defined for real 'common' function in
file 'kernel/bpf/helpers.c'.

Signed-off-by: Haiyue Wang <haiyue.wang@xxxxxxxxx>
---
 kernel/bpf/arena.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/bpf/arena.c b/kernel/bpf/arena.c
index 6c81630c5293..ef2177c0465f 100644
--- a/kernel/bpf/arena.c
+++ b/kernel/bpf/arena.c
@@ -557,13 +557,13 @@ BTF_ID_FLAGS(func, bpf_arena_alloc_pages, KF_TRUSTED_ARGS | KF_SLEEPABLE)
 BTF_ID_FLAGS(func, bpf_arena_free_pages, KF_TRUSTED_ARGS | KF_SLEEPABLE)
 BTF_KFUNCS_END(arena_kfuncs)
 
-static const struct btf_kfunc_id_set common_kfunc_set = {
+static const struct btf_kfunc_id_set arena_kfunc_set = {
 	.owner = THIS_MODULE,
 	.set   = &arena_kfuncs,
 };
 
 static int __init kfunc_init(void)
 {
-	return register_btf_kfunc_id_set(BPF_PROG_TYPE_UNSPEC, &common_kfunc_set);
+	return register_btf_kfunc_id_set(BPF_PROG_TYPE_UNSPEC, &arena_kfunc_set);
 }
 late_initcall(kfunc_init);
-- 
2.43.2





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux