aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2015-10-15 12:25:00 -0500
committerAndreas Blaesius <skate4life@gmx.de>2017-05-17 19:25:28 +0200
commitbef2b3da0857396fc79f2f7be0863ce4e4b63f38 (patch)
tree408735da6438d49176e7028779fe9c157bbcd82c /include
parent9840aa82c45aa474a0ef40ddc0cfbf59c2cff4c7 (diff)
downloadkernel_samsung_tuna-bef2b3da0857396fc79f2f7be0863ce4e4b63f38.tar.gz
kernel_samsung_tuna-bef2b3da0857396fc79f2f7be0863ce4e4b63f38.tar.bz2
kernel_samsung_tuna-bef2b3da0857396fc79f2f7be0863ce4e4b63f38.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. Change-Id: I1865e3d7a1faee42a5008a9ad58c4d3323ea4bab Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> (cherry picked from commit c91234366e4cfd4f70c73e7d79ede92a6e462a88)
Diffstat (limited to 'include')
-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 7b547c235d9..4fbf56de011 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1857,7 +1857,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,