Message ID | 1605063541-25424-1-git-send-email-kaixuxia@tencent.com |
---|---|
State | New |
Headers | show |
Series | [v2] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id | expand |
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 6200519582a6..3fea4fc04e94 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -9572,7 +9572,8 @@ static int check_pseudo_btf_id(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_insn_aux_data *aux) { - u32 datasec_id, type, id = insn->imm; + s32 datasec_id; + u32 type, id = insn->imm; const struct btf_var_secinfo *vsi; const struct btf_type *datasec; const struct btf_type *t;