summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-12-21 14:04:46 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-21 17:56:40 +0100
commit7fa4bd739fc0fa209fa5120383aab17f6e9600f7 (patch)
tree570a74b1551a86637db627519dba3d68e65334d2 /tools/testing
parentMerge tag 'mlx5-XDP-100Mpps' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadlinux-7fa4bd739fc0fa209fa5120383aab17f6e9600f7.tar.xz
linux-7fa4bd739fc0fa209fa5120383aab17f6e9600f7.zip
bpf: fix segfault in test_verifier selftest
Minor fallout from merge resolution, test_verifier was segfaulting because the REJECT result was correct, but errstr was NULL. Properly fix it as in 339bbff2d6e0. Fixes: 339bbff2d6e0 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/test_verifier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index baafe5c76aca..33f7d38849b8 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -14194,7 +14194,8 @@ static struct bpf_test tests[] = {
},
.prog_type = BPF_PROG_TYPE_SOCKET_FILTER,
.errstr_unpriv = "function calls to other bpf functions are allowed for root only",
- .result = REJECT,
+ .errstr = "!read_ok",
+ .result = REJECT,
},
{
"jset: functional",