summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-05-08 18:58:39 -0700
committerJakub Kicinski <kuba@kernel.org>2020-05-08 18:58:39 -0700
commit14d8f7486a344ee64c37641c70b2d67013eb9de6 (patch)
tree53407f0b097cda0e2851cfc93ec0893b4d796cab /net/core
parent6d32a5119811d2e9b5caa284181944c6f1f192ed (diff)
parent81aabbb9fb7b4b1efd073b62f0505d3adad442f3 (diff)
downloadlinux-14d8f7486a344ee64c37641c70b2d67013eb9de6.tar.gz
linux-14d8f7486a344ee64c37641c70b2d67013eb9de6.tar.bz2
linux-14d8f7486a344ee64c37641c70b2d67013eb9de6.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2020-05-09 The following pull-request contains BPF updates for your *net* tree. We've added 4 non-merge commits during the last 9 day(s) which contain a total of 4 files changed, 11 insertions(+), 6 deletions(-). The main changes are: 1) Fix msg_pop_data() helper incorrectly setting an sge length in some cases as well as fixing bpf_tcp_ingress() wrongly accounting bytes in sg.size, from John Fastabend. 2) Fix to return an -EFAULT error when copy_to_user() of the value fails in map_lookup_and_delete_elem(), from Wei Yongjun. 3) Fix sk_psock refcnt leak in tcp_bpf_recvmsg(), from Xiyu Yang. ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 7d6ceaa54d21..5cc9276f1023 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2590,8 +2590,8 @@ BPF_CALL_4(bpf_msg_pop_data, struct sk_msg *, msg, u32, start,
}
pop = 0;
} else if (pop >= sge->length - a) {
- sge->length = a;
pop -= (sge->length - a);
+ sge->length = a;
}
}