We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b69d441 commit fce7bd8Copy full SHA for fce7bd8
kernel/bpf/verifier.c
@@ -3649,16 +3649,16 @@ static int insn_def_regno(const struct bpf_insn *insn)
3649
case BPF_ST:
3650
return -1;
3651
case BPF_STX:
3652
- if ((BPF_MODE(insn->code) == BPF_ATOMIC ||
3653
- BPF_MODE(insn->code) == BPF_PROBE_ATOMIC) &&
3654
- (insn->imm & BPF_FETCH)) {
+ if (BPF_MODE(insn->code) == BPF_ATOMIC ||
+ BPF_MODE(insn->code) == BPF_PROBE_ATOMIC) {
3655
if (insn->imm == BPF_CMPXCHG)
3656
return BPF_REG_0;
3657
- else
+ else if (insn->imm == BPF_LOAD_ACQ)
+ return insn->dst_reg;
3658
+ else if (insn->imm & BPF_FETCH)
3659
return insn->src_reg;
- } else {
3660
- return -1;
3661
}
+ return -1;
3662
default:
3663
return insn->dst_reg;
3664
0 commit comments