summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/offload.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-03-27 22:36:17 +0100
committerLinus Walleij <linus.walleij@linaro.org>2020-03-27 22:36:17 +0100
commit06dd3f31cb70035cbd3f507c11fd50e3089aeb81 (patch)
tree98065919df104fba32191f2464f4193a998cd6a1 /kernel/bpf/offload.c
parenttools: gpio: Fix out-of-tree build regression (diff)
parentLinux 5.6-rc7 (diff)
downloadlinux-06dd3f31cb70035cbd3f507c11fd50e3089aeb81.tar.xz
linux-06dd3f31cb70035cbd3f507c11fd50e3089aeb81.zip
Merge tag 'v5.6-rc7' into devel
Linux 5.6-rc7
Diffstat (limited to 'kernel/bpf/offload.c')
-rw-r--r--kernel/bpf/offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/offload.c b/kernel/bpf/offload.c
index 2c5dc6541ece..bd09290e3648 100644
--- a/kernel/bpf/offload.c
+++ b/kernel/bpf/offload.c
@@ -321,7 +321,7 @@ int bpf_prog_offload_info_fill(struct bpf_prog_info *info,
ulen = info->jited_prog_len;
info->jited_prog_len = aux->offload->jited_len;
- if (info->jited_prog_len & ulen) {
+ if (info->jited_prog_len && ulen) {
uinsns = u64_to_user_ptr(info->jited_prog_insns);
ulen = min_t(u32, info->jited_prog_len, ulen);
if (copy_to_user(uinsns, aux->offload->jited_image, ulen)) {