> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
> --- a/kernel/bpf/btf.c
> +++ b/kernel/bpf/btf.c
[ ... ]
> @@ -4080,20 +4100,25 @@ int btf_check_and_fixup_fields(const struct btf *btf,
> struct btf_record *rec)
> int i;
>
> /* There are three types that signify ownership of some other type:
> - * kptr_ref, bpf_list_head, bpf_rb_root.
> + * kptr_ref, bpf_list_head/node, bpf_rb_root.
Should "bpf_list_head/node" be just "bpf_list_head" here? bpf_list_node
doesn't signify ownership of another type -- it is the type that is
owned.
The unmodified paragraph just below still says:
"Hence we only need to ensure that bpf_{list_head,rb_root} ownership
does not form cycles."
And further down in this same function:
"A type can only _own_ another type in user BTF if it has a
bpf_{list_head,rb_root}. Let's call these root types."
Both correctly exclude nodes from the ownership types.
> * kptr_ref only supports storing kernel types, which can't store
> * references to program allocated local types.
> *
> * Hence we only need to ensure that bpf_{list_head,rb_root} ownership
> * does not form cycles.
> */
[ ... ]
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/22576595943
AI-authorship-score: low
AI-authorship-explanation: Slightly formal commit message phrasing is
consistent with non-native English; code and multi-version iteration strongly
suggest human authorship.
issues-found: 1
issue-severity-score: low
issue-severity-explanation: Inaccurate comment in btf_check_and_fixup_fields
incorrectly describes bpf_list_node as signifying ownership, contradicting
other comments within the same function; no runtime impact.