summaryrefslogtreecommitdiff
path: root/kernel/bpf/offload.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-01-17 01:15:07 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-17 01:15:08 +0100
commitf2f742f425563d7f6991e510875e95287aed9d9b (patch)
treeeffbbab7241a7b203f123449f858517ba09bdb22 /kernel/bpf/offload.c
parent4c38f74c9186e2bc32789ddab3a95ed384c695d7 (diff)
parent74801e50d5b89329e6c02b8bd924a41234f76316 (diff)
Merge branch 'bpf-various-improvements'
Jakub Kicinski says: ==================== This series combines a number of random improvements ranging from libbpf to nfp driver. NFP patches make better use of the verifier log. There is a requested adjustment to the map offload code, and a warning fix for a W=1 build to the disassembler. Quentin also fixes the libbpf program type detection, while Jiong allows the use of libbfd compiled from source. ==================== Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf/offload.c')
-rw-r--r--kernel/bpf/offload.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/bpf/offload.c b/kernel/bpf/offload.c
index 453785fa1881..a88cebf368bf 100644
--- a/kernel/bpf/offload.c
+++ b/kernel/bpf/offload.c
@@ -395,10 +395,8 @@ bool bpf_offload_dev_match(struct bpf_prog *prog, struct bpf_map *map)
struct bpf_prog_offload *offload;
bool ret;
- if (!!bpf_prog_is_dev_bound(prog->aux) != !!bpf_map_is_dev_bound(map))
+ if (!bpf_prog_is_dev_bound(prog->aux) || !bpf_map_is_dev_bound(map))
return false;
- if (!bpf_prog_is_dev_bound(prog->aux))
- return true;
down_read(&bpf_devs_lock);
offload = prog->aux->offload;