diff options
Diffstat (limited to 'kernel/bpf/offload.c')
-rw-r--r-- | kernel/bpf/offload.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/bpf/offload.c b/kernel/bpf/offload.c index c9401075b58c..ac747d5cf7c6 100644 --- a/kernel/bpf/offload.c +++ b/kernel/bpf/offload.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2017 Netronome Systems, Inc. | 2 | * Copyright (C) 2017-2018 Netronome Systems, Inc. |
3 | * | 3 | * |
4 | * This software is licensed under the GNU General License Version 2, | 4 | * This software is licensed under the GNU General License Version 2, |
5 | * June 1991 as shown in the file COPYING in the top-level directory of this | 5 | * June 1991 as shown in the file COPYING in the top-level directory of this |
@@ -474,8 +474,10 @@ bool bpf_offload_dev_match(struct bpf_prog *prog, struct bpf_map *map) | |||
474 | struct bpf_prog_offload *offload; | 474 | struct bpf_prog_offload *offload; |
475 | bool ret; | 475 | bool ret; |
476 | 476 | ||
477 | if (!bpf_prog_is_dev_bound(prog->aux) || !bpf_map_is_dev_bound(map)) | 477 | if (!bpf_prog_is_dev_bound(prog->aux)) |
478 | return false; | 478 | return false; |
479 | if (!bpf_map_is_dev_bound(map)) | ||
480 | return bpf_map_offload_neutral(map); | ||
479 | 481 | ||
480 | down_read(&bpf_devs_lock); | 482 | down_read(&bpf_devs_lock); |
481 | offload = prog->aux->offload; | 483 | offload = prog->aux->offload; |