summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf
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 08:56:40 -0800
commit7fa4bd739fc0fa209fa5120383aab17f6e9600f7 (patch)
tree570a74b1551a86637db627519dba3d68e65334d2 /tools/testing/selftests/bpf
parent3715917408f35395922d06a5a6868c278b0e5c17 (diff)
downloadlinux-7fa4bd739fc0fa209fa5120383aab17f6e9600f7.tar.bz2
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/selftests/bpf')
-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",