OSDN Git Service

selftests/bpf: add missing pointer dereference for map stacktrace fixup
authorStanislav Fomichev <sdf@google.com>
Fri, 7 Dec 2018 04:14:11 +0000 (20:14 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 10 Dec 2018 19:20:08 +0000 (20:20 +0100)
I get a segfault without it, other fixups always do dereference, and
without dereference I don't understand how it can ever work.

Fixes: 7c85c448e7d74 ("selftests/bpf: test_verifier, check bpf_map_lookup_elem access in bpf prog")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_verifier.c

index df6f751..d23929a 100644 (file)
@@ -14166,7 +14166,7 @@ static void do_test_fixup(struct bpf_test *test, enum bpf_map_type prog_type,
                do {
                        prog[*fixup_map_stacktrace].imm = map_fds[12];
                        fixup_map_stacktrace++;
-               } while (fixup_map_stacktrace);
+               } while (*fixup_map_stacktrace);
        }
 }