diff options
Diffstat (limited to 'include/linux/bpf_verifier.h')
| -rw-r--r-- | include/linux/bpf_verifier.h | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index c1fc4af47f69..3a9d2d7cc6b7 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -570,9 +570,11 @@ static inline u32 type_flag(u32 type)  	return type & ~BPF_BASE_TYPE_MASK;  } +/* only use after check_attach_btf_id() */  static inline enum bpf_prog_type resolve_prog_type(struct bpf_prog *prog)  { -	return prog->aux->dst_prog ? prog->aux->dst_prog->type : prog->type; +	return prog->type == BPF_PROG_TYPE_EXT ? +		prog->aux->dst_prog->type : prog->type;  }  #endif /* _LINUX_BPF_VERIFIER_H */  | 
