summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2019-04-18 23:33:30 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-04-19 01:10:47 +0200
commit849f257f61ff7dde49d59c62802e5913ff7a7cbb (patch)
treeef41039682fbd0ba21141b6797f1c810428e2353
parentselftests/bpf: fix compile errors due to unsync linux/in6.h and netinet/in.h (diff)
downloadlinux-849f257f61ff7dde49d59c62802e5913ff7a7cbb.tar.xz
linux-849f257f61ff7dde49d59c62802e5913ff7a7cbb.zip
bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c
map_fds[16] is the last one index-ed by fixup_map_array_small. Hence, the MAX_NR_MAPS should be 17 instead. Fixes: fb2abb73e575 ("bpf, selftest: test {rd, wr}only flags and direct value access") Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r--tools/testing/selftests/bpf/test_verifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 6cb6a1074fd1..ed9e894afef3 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -52,7 +52,7 @@
#define MAX_INSNS BPF_MAXINSNS
#define MAX_TEST_INSNS 1000000
#define MAX_FIXUPS 8
-#define MAX_NR_MAPS 16
+#define MAX_NR_MAPS 17
#define MAX_TEST_RUNS 8
#define POINTER_VALUE 0xcafe4all
#define TEST_DATA_LEN 64