projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e55dad1
)
bpf, btf: Fix return value of register_btf_id_dtor_kfuncs
author
Geliang Tang
<tanggeliang@kylinos.cn>
Thu, 8 Feb 2024 06:24:21 +0000
(14:24 +0800)
committer
Martin KaFai Lau
<martin.lau@kernel.org>
Thu, 8 Feb 2024 19:05:07 +0000
(11:05 -0800)
The same as __register_btf_kfunc_id_set(), to let the modules with
stripped btf section loaded, this patch changes the return value of
register_btf_id_dtor_kfuncs() too from -ENOENT to 0 when btf is NULL.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link:
https://lore.kernel.org/r/eab65586d7fb0e72f2707d3747c7d4a5d60c823f.1707373307.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
kernel/bpf/btf.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/btf.c
b/kernel/bpf/btf.c
index f7725cb6e564bff3768b87f717e6bcd81a08f9c9..16eb937eca462d66150fa11c3cbb0efa7f851b35 100644
(file)
--- a/
kernel/bpf/btf.c
+++ b/
kernel/bpf/btf.c
@@
-8219,10
+8219,8
@@
int register_btf_id_dtor_kfuncs(const struct btf_id_dtor_kfunc *dtors, u32 add_c
pr_err("missing vmlinux BTF, cannot register dtor kfuncs\n");
return -ENOENT;
}
- if (owner && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES)) {
- pr_err("missing module BTF, cannot register dtor kfuncs\n");
- return -ENOENT;
- }
+ if (owner && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES))
+ pr_warn("missing module BTF, cannot register dtor kfuncs\n");
return 0;
}
if (IS_ERR(btf))