summaryrefslogtreecommitdiff
path: root/kernel/bpf/verifier.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-02-26 17:38:32 +0300
committerDavid Sterba <dsterba@suse.com>2016-02-26 17:38:32 +0300
commit675d276b322b45e7bf7c616a2847bdc425745b99 (patch)
treec61e7108034bf1230024880ec8ae46a9617077c2 /kernel/bpf/verifier.c
parente9ddd77a31e6ba2867b9c33547f6f079d55f7a72 (diff)
parent73beece9ca07c003e0e4f4825b12be167334d4ad (diff)
downloadlinux-675d276b322b45e7bf7c616a2847bdc425745b99.tar.xz
Merge branch 'foreign/liubo/replace-lockup' into for-chris-4.6
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r--kernel/bpf/verifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index d1d3e8f57de9..2e7f7ab739e4 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2082,7 +2082,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;
}
}