diff options
author | Alex Shi <alex.shi@linaro.org> | 2018-02-22 10:16:59 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2018-02-22 10:16:59 +0800 |
commit | f7901365aa48b20b25f8402e0fd1eea4ac6c55e7 (patch) | |
tree | 4cab2d6b92324c06a457c43a5c8bac55581cdfb5 /lib | |
parent | cd1fe2006b62234455a91e428bad45331dc79250 (diff) | |
parent | 701115b70ba8e8b20c6cfe689db4c1dd6af3ece9 (diff) |
Merge remote-tracking branch 'rt-stable/v4.4-rt' into linux-linaro-lsk-v4.4-rt
Conflicts:
arch/x86/Kconfig
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test_bpf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 7e26aea3e404..b7908d949a5f 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -5304,9 +5304,8 @@ static struct bpf_prog *generate_filter(int which, int *err) return NULL; } } - /* We don't expect to fail. */ if (*err) { - pr_cont("FAIL to attach err=%d len=%d\n", + pr_cont("FAIL to prog_create err=%d len=%d\n", *err, fprog.len); return NULL; } @@ -5325,7 +5324,11 @@ static struct bpf_prog *generate_filter(int which, int *err) fp->type = BPF_PROG_TYPE_SOCKET_FILTER; memcpy(fp->insnsi, fptr, fp->len * sizeof(struct bpf_insn)); - bpf_prog_select_runtime(fp); + *err = bpf_prog_select_runtime(fp); + if (*err) { + pr_cont("FAIL to select_runtime err=%d\n", *err); + return NULL; + } break; } @@ -5511,8 +5514,8 @@ static __init int test_bpf(void) pass_cnt++; continue; } - - return err; + err_cnt++; + continue; } pr_cont("jited:%u ", fp->jited); |