Message ID | 1457390164-3615-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 4d19a8c..9fccb7c 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -1975,7 +1975,7 @@ static void adjust_branches(struct bpf_prog *prog, int pos, int delta) /* adjust offset of jmps if necessary */ if (i < pos && i + insn->off + 1 > pos) insn->off += delta; - else if (i > pos && i + insn->off + 1 < pos) + else if (i > pos + delta && i + insn->off + 1 <= pos + delta) insn->off -= delta; } }