projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c71b5ad
)
test_bpf: avoid oopsing the kernel when generate_test_data() fails.
author
Nicolas Schichan
<nschichan@freebox.fr>
Tue, 4 Aug 2015 13:19:07 +0000
(15:19 +0200)
committer
David S. Miller
<davem@davemloft.net>
Fri, 7 Aug 2015 05:02:31 +0000
(22:02 -0700)
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_bpf.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/test_bpf.c
b/lib/test_bpf.c
index 3afddf2026c983d279fe822a0c42b7f1a65f193a..6843d0b6203295910bf500691f7301cb1b695e93 100644
(file)
--- a/
lib/test_bpf.c
+++ b/
lib/test_bpf.c
@@
-4672,6
+4672,11
@@
static int run_one(const struct bpf_prog *fp, struct bpf_test *test)
break;
data = generate_test_data(test, i);
+ if (!data && !(test->aux & FLAG_NO_DATA)) {
+ pr_cont("data generation failed ");
+ err_cnt++;
+ break;
+ }
ret = __run_one(fp, data, runs, &duration);
release_test_data(test, data);