]> git.baikalelectronics.ru Git - kernel.git/commit
vhost_net: fix wrong iter offset when setting number of buffers
authorJason Wang <jasowang@redhat.com>
Sun, 15 Feb 2015 08:35:17 +0000 (16:35 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Feb 2015 16:17:15 +0000 (08:17 -0800)
commit0c8259beaea4096041df48e0828c7c06f6586734
tree57ed67565cc5723eedfb15bc30894f29069177af
parent14a0e0838728c98b932364715b628997f80d15ac
vhost_net: fix wrong iter offset when setting number of buffers

In commit 63fe659f48a2 ("vhost: don't bother copying iovecs in
handle_rx(), kill memcpy_toiovecend()"), we advance iov iter fixup
sizeof(struct virtio_net_hdr) bytes and fill the number of buffers
after doing the socket recvmsg(). This work well but was broken after
commit cd3a6587d0fc ("Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") which tries
to advance sizeof(struct virtio_net_hdr_mrg_rxbuf). It will fill the
number of buffers at the wrong place. This patch fixes this.

Fixes cd3a6587d0fc
("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
Cc: David S. Miller <davem@davemloft.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c