bpf: fix max call depth check
authorAlexei Starovoitov <ast@kernel.org>
Mon, 25 Dec 2017 21:15:42 +0000 (13:15 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 27 Dec 2017 17:36:23 +0000 (18:36 +0100)
commitaada9ce644e53410954daa6beb1f7c4ca158abd7
tree6b20b371d1cb00f74dc0a298bc882d1c9acbd3f1
parent6b86c4217c231cbd268bd8c6fda025b27047d3ed
bpf: fix max call depth check

fix off by one error in max call depth check
and add a test

Fixes: f4d7e40a5b71 ("bpf: introduce function calls (verification)")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/verifier.c
tools/testing/selftests/bpf/test_verifier.c