Message ID | 20230612172307.3923165-3-sdf@google.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | BPF |
Headers | show |
Series | bpf: netdev TX metadata | expand |
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index bd2cac057928..9bdaa1225e8a 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -6140,6 +6140,8 @@ static int btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf, *flag = 0; again: tname = __btf_name_by_offset(btf, t->name_off); + if (btf_type_is_typedef(t)) + t = btf_type_by_id(btf, t->type); if (!btf_type_is_struct(t)) { bpf_log(log, "Type '%s' is not a struct\n", tname); return -EINVAL;
It is impossible to use skb_frag_t in the tracing program. So let's resolve a single typedef when walking the struct. Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev <sdf@google.com> --- kernel/bpf/btf.c | 2 ++ 1 file changed, 2 insertions(+)