diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2016-01-02 01:11:55 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-01-22 21:40:09 +0000 |
commit | 414d4d9d3354c8e4aa58dc51cea5768f145e5275 (patch) | |
tree | 4dd30438885fc292e53da60d7081509eb1f4495e /net/ipv4 | |
parent | ef90cf3d0b59e3b1dcfe94d1a241107667e6e96a (diff) |
Revert "net: add length argument to skb_copy_and_csum_datagram_iovec"
This reverts commit 127500d724f8c43f452610c9080444eedb5eaa6c. That fixed
the problem of buffer over-reads introduced by backporting commit
89c22d8c3b27 ("net: Fix skb csum races when peeking"), but resulted in
incorrect checksumming for short reads. It will be replaced with a
complete fix.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3877e1678247..039e40f33860 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5198,7 +5198,7 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) err = skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk); else err = skb_copy_and_csum_datagram_iovec(skb, hlen, - tp->ucopy.iov, chunk); + tp->ucopy.iov); if (!err) { tp->ucopy.len -= chunk; diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index b1112217c76a..5e920439a89a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1207,7 +1207,7 @@ try_again: else { err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), - msg->msg_iov, copied); + msg->msg_iov); if (err == -EINVAL) goto csum_copy_err; |