Commit e18e2e70 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Martin KaFai Lau
Browse files

libbpf: handle yet another corner case of nulling out struct_ops program



There is yet another corner case where user can set STRUCT_OPS program
reference in STRUCT_OPS map to NULL, but libbpf will fail to disable
autoload for such BPF program. This time it's the case of "new" kernel
which has type information about callback field, but user explicitly
nulled-out program reference from user-space after opening BPF object.

Fix, hopefully, the last remaining unhandled case.

Fixes: 0737df6d ("libbpf: better fix for handling nulled-out struct_ops program")
Fixes: f973fccd ("libbpf: handle nulled-out program in struct_ops correctly")
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240507001335.1445325-3-andrii@kernel.org


Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
parent 8374b56b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment