diff options
| author | Andrii Nakryiko <[email protected]> | 2021-12-02 13:39:47 -0800 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2021-12-02 13:39:47 -0800 |
| commit | 7d9b3ad424f4e6b039201b254bfef01de4315192 (patch) | |
| tree | faad0e46d7f02e1b953633bce101058334d4173e /kernel | |
| parent | 099f83aa2d06680d5987e43fed1afeda14b5037e (diff) | |
| parent | 3345193f6f3cc24791c245d4ba2c38502f1cf684 (diff) | |
Merge branch 'Fixes for kfunc-mod regressions and warnings'
Kumar Kartikeya says:
====================
This set includes fixes for two regressions and one build warning introduced by
the kfunc for modules series.
Changelog:
----------
v1 -> v2:
v1: https://lore.kernel.org/bpf/[email protected]
* Instead of demoting resolve_btfids warning to debug, only skip in case of
set->cnt == 0.
====================
Signed-off-by: Andrii Nakryiko <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/bpf/btf.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index dbc3ad07e21b..9bdb03767db5 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -6346,11 +6346,6 @@ BTF_ID_LIST_GLOBAL_SINGLE(btf_task_struct_ids, struct, task_struct) /* BTF ID set registration API for modules */ -struct kfunc_btf_id_list { - struct list_head list; - struct mutex mutex; -}; - #ifdef CONFIG_DEBUG_INFO_BTF_MODULES void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l, @@ -6376,8 +6371,6 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, { struct kfunc_btf_id_set *s; - if (!owner) - return false; mutex_lock(&klist->mutex); list_for_each_entry(s, &klist->list, list) { if (s->owner == owner && btf_id_set_contains(s->set, kfunc_id)) { @@ -6389,8 +6382,6 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, return false; } -#endif - #define DEFINE_KFUNC_BTF_ID_LIST(name) \ struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \ __MUTEX_INITIALIZER(name.mutex) }; \ @@ -6398,3 +6389,5 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list); DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list); + +#endif |