Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Martin KaFai Lau and committed by
Alexei Starovoitov
849f257f 5de35e3a

+1 -1
+1 -1
tools/testing/selftests/bpf/test_verifier.c
··· 52 52 #define MAX_INSNS BPF_MAXINSNS 53 53 #define MAX_TEST_INSNS 1000000 54 54 #define MAX_FIXUPS 8 55 - #define MAX_NR_MAPS 16 55 + #define MAX_NR_MAPS 17 56 56 #define MAX_TEST_RUNS 8 57 57 #define POINTER_VALUE 0xcafe4all 58 58 #define TEST_DATA_LEN 64