Commit e34684f8 authored by Nicolas Schichan's avatar Nicolas Schichan Committed by David S. Miller
Browse files

test_bpf: avoid oopsing the kernel when generate_test_data() fails.

Signed-off-by: default avatarNicolas Schichan <>
Acked-by: default avatarAlexei Starovoitov <>
Acked-by: default avatarDaniel Borkmann <>
Signed-off-by: default avatarDavid S. Miller <>
parent c71b5ad0
......@@ -4672,6 +4672,11 @@ static int run_one(const struct bpf_prog *fp, struct bpf_test *test)
data = generate_test_data(test, i);
if (!data && !(test->aux & FLAG_NO_DATA)) {
pr_cont("data generation failed ");
ret = __run_one(fp, data, runs, &duration);
release_test_data(test, data);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment