Netdev List
 help / color / mirror / Atom feed
* [PATCH bpf] selftests/bpf: add missing pointer dereference for map stacktrace fixup
@ 2018-12-07  4:14 Stanislav Fomichev
  2018-12-07  4:31 ` Prashant Bhole
  2018-12-10 19:22 ` Daniel Borkmann
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Fomichev @ 2018-12-07  4:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, ast, daniel, bhole_prashant_q7, Stanislav Fomichev

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>
---
 tools/testing/selftests/bpf/test_verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index df6f751cc1e8..d23929a1985d 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -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);
 	}
 }
 
-- 
2.20.0.rc2.403.gdbc3b29805-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-10 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07  4:14 [PATCH bpf] selftests/bpf: add missing pointer dereference for map stacktrace fixup Stanislav Fomichev
2018-12-07  4:31 ` Prashant Bhole
2018-12-10 19:22 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox