Message ID | 20230407084608.62296-2-zhoufeng.zf@bytedance.com |
---|---|
State | New |
Headers | show |
Series | Fix failure to access u32* argument of tracked function | expand |
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 593c45a294d0..17c65de1e48b 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -5913,9 +5913,8 @@ static bool is_int_ptr(struct btf *btf, const struct btf_type *t) /* t comes in already as a pointer */ t = btf_type_by_id(btf, t->type); - /* allow const */ - if (BTF_INFO_KIND(t->info) == BTF_KIND_CONST) - t = btf_type_by_id(btf, t->type); + /* skip modifiers */ + t = btf_type_skip_modifiers(btf, t->type, NULL); return btf_type_is_int(t); }