]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: fix register_btf_kfunc_id_set for !CONFIG_DEBUG_INFO_BTF
authorStanislav Fomichev <sdf@google.com>
Wed, 26 Jan 2022 00:13:40 +0000 (16:13 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 26 Jan 2022 03:27:28 +0000 (19:27 -0800)
commitc982e81087463d3a7fd87c28202c4ed92b83700a
tree86d43c751f9b7a7114cbfe7f0f4aeec68db461cd
parent212e33c97c60867e7b3349f2359fd06a2abdcf1f
bpf: fix register_btf_kfunc_id_set for !CONFIG_DEBUG_INFO_BTF

Commit fd84087ce58a ("bpf: Populate kfunc BTF ID sets in struct btf")
breaks loading of some modules when CONFIG_DEBUG_INFO_BTF is not set.
register_btf_kfunc_id_set returns -ENOENT to the callers when
there is no module btf. Let's return 0 (success) instead to let
those modules work in !CONFIG_DEBUG_INFO_BTF cases.

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Fixes: fd84087ce58a ("bpf: Populate kfunc BTF ID sets in struct btf")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20220126001340.1573649-1-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c