Skip to content

Commit ece4250

Browse files
Yonghong SongKernel Patches Daemon
authored andcommitted
bpf: Remove a WARN_ON_ONCE warning related to local kptr
Currently, in function bpf_obj_free_fields(), for local kptr, a warning will be issued if the struct does not contain any special fields. But actually the kernel seems totally okay with a local kptr without any special fields. Permitting no special fields also aligns with future percpu kptr which also allows no special fields. Signed-off-by: Yonghong Song <[email protected]>
1 parent fd43fdb commit ece4250

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/bpf/syscall.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ void bpf_obj_free_fields(const struct btf_record *rec, void *obj)
657657
if (!btf_is_kernel(field->kptr.btf)) {
658658
pointee_struct_meta = btf_find_struct_meta(field->kptr.btf,
659659
field->kptr.btf_id);
660-
WARN_ON_ONCE(!pointee_struct_meta);
661660
migrate_disable();
662661
__bpf_obj_drop_impl(xchgd_field, pointee_struct_meta ?
663662
pointee_struct_meta->record :

0 commit comments

Comments
 (0)