Skip to content

Commit b12f031

Browse files
kkdwivedianakryiko
authored andcommitted
bpf: Fix bpf_check_mod_kfunc_call for built-in modules
When module registering its set is built-in, THIS_MODULE will be NULL, hence we cannot return early in case owner is NULL. Fixes: 14f267d ("bpf: btf: Introduce helpers for dynamic BTF set registration") Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent d9847eb commit b12f031

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/bpf/btf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6371,8 +6371,6 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id,
63716371
{
63726372
struct kfunc_btf_id_set *s;
63736373

6374-
if (!owner)
6375-
return false;
63766374
mutex_lock(&klist->mutex);
63776375
list_for_each_entry(s, &klist->list, list) {
63786376
if (s->owner == owner && btf_id_set_contains(s->set, kfunc_id)) {

0 commit comments

Comments
 (0)