summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorSridhar Samudrala <sri@us.ibm.com>2009-06-05 11:35:40 +0200
committerDavid S. Miller <davem@davemloft.net>2009-06-08 09:25:38 +0200
commitd2d27bfd11659675fdd1c20b1c7f8f59873cad60 (patch)
tree20bda7f4a5a30067d793b2c84ba4dd2a41a13b90 /net/core
parentnet: skb_shared_info optimization (diff)
downloadlinux-d2d27bfd11659675fdd1c20b1c7f8f59873cad60.tar.xz
linux-d2d27bfd11659675fdd1c20b1c7f8f59873cad60.zip
net: Fix skb_copy_datagram_from_iovec() to pass the right offset
I am working on enabling UFO between KVM guests using virtio-net and i have some patches that i got working with 2.6.30-rc8. When i wanted to try them with net-next-2.6, i noticed that virtio-net is not working with that tree. After some debugging, it turned out to be several bugs in the recent patches to fix aio with tun driver, specifically the following 2 commits. http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=0a1ec07a67bd8b0033dace237249654d015efa21 http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=6f26c9a7555e5bcca3560919db9b852015077dae Fix the call to memcpy_from_iovecend() in skb_copy_datagram_from_iovec to pass the right iovec offset. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/datagram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c
index e2a36f05cdf7..774bcd9119d9 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -466,7 +466,8 @@ int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset,
if (copy > 0) {
if (copy > len)
copy = len;
- if (memcpy_fromiovecend(skb->data + offset, from, 0, copy))
+ if (memcpy_fromiovecend(skb->data + offset, from, from_offset,
+ copy))
goto fault;
if ((len -= copy) == 0)
return 0;