On 2/14/25 8:45 AM, Amery Hung wrote:
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 9de6acddd479..fd3470fbd144 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -6677,6 +6677,7 @@ bool btf_ctx_access(int off, int size, enum bpf_access_type type, info->reg_type = ctx_arg_info->reg_type; info->btf = ctx_arg_info->btf ? : btf_vmlinux; info->btf_id = ctx_arg_info->btf_id; + info->ref_obj_id = ctx_arg_info->refcounted ? ctx_arg_info->ref_obj_id : 0;
A small nit. No need to check ctx_arg_info->refcounted. If refcounted is false, ref_obj_id should have been 0.
info->ref_obj_id = ctx_arg_info->ref_obj_id; Acked-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>