summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2015-10-15 14:25:03 +0200
committerBen Hutchings <ben@decadent.org.uk>2015-11-17 15:54:45 +0000
commit127500d724f8c43f452610c9080444eedb5eaa6c (patch)
treec2667b2ad3456bc39a3b1b3c3e61951a203521f0 /include/linux
parent4421196453ad90ff54c97b5d600d65464a3965b2 (diff)
downloadlwn-127500d724f8c43f452610c9080444eedb5eaa6c.tar.gz
lwn-127500d724f8c43f452610c9080444eedb5eaa6c.zip
net: add length argument to skb_copy_and_csum_datagram_iovec
Without this length argument, we can read past the end of the iovec in memcpy_toiovec because we have no way of knowing the total length of the iovec's buffers. This is needed for stable kernels where 89c22d8c3b27 ("net: Fix skb csum races when peeking") has been backported but that don't have the ioviter conversion, which is almost all the stable trees <= 3.18. This also fixes a kernel crash for NFS servers when the client uses -onfsvers=3,proto=udp to mount the export. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> [bwh: Backported to 3.2: adjust context in include/linux/skbuff.h] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1b4ea29d3943..d38c2eebf1be 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2131,7 +2131,8 @@ extern int skb_copy_datagram_iovec(const struct sk_buff *from,
int size);
extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
int hlen,
- struct iovec *iov);
+ struct iovec *iov,
+ int len);
extern int skb_copy_datagram_from_iovec(struct sk_buff *skb,
int offset,
const struct iovec *from,