Skip to content

Commit

Permalink
selftests/bpf: add missing pointer dereference for map stacktrace fixup
Browse files Browse the repository at this point in the history
I get a segfault without it, other fixups always do dereference, and
without dereference I don't understand how it can ever work.

Fixes: 7c85c44 ("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>
  • Loading branch information
Stanislav Fomichev authored and Daniel Borkmann committed Dec 10, 2018
1 parent 51a11b1 commit c2a20a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/test_verifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit c2a20a2

Please sign in to comment.