From 6d60f1991ee2ea2bf5eb99b5fe9de13cf842450e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 28 Oct 2012 11:40:10 -0700 Subject: [PATCH] 3.4-stable patches added patches: vhost-fix-mergeable-bufs-on-be-hosts.patch --- queue-3.4/series | 1 + ...vhost-fix-mergeable-bufs-on-be-hosts.patch | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 queue-3.4/vhost-fix-mergeable-bufs-on-be-hosts.patch diff --git a/queue-3.4/series b/queue-3.4/series index 64b1721a809..645f55efb31 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -31,3 +31,4 @@ usb-mos7840-fix-urb-leak-at-release.patch usb-mos7840-fix-port-device-leak-in-error-path.patch usb-mos7840-remove-null-urb-submission.patch usb-mos7840-remove-invalid-disconnect-handling.patch +vhost-fix-mergeable-bufs-on-be-hosts.patch diff --git a/queue-3.4/vhost-fix-mergeable-bufs-on-be-hosts.patch b/queue-3.4/vhost-fix-mergeable-bufs-on-be-hosts.patch new file mode 100644 index 00000000000..d396588c354 --- /dev/null +++ b/queue-3.4/vhost-fix-mergeable-bufs-on-be-hosts.patch @@ -0,0 +1,33 @@ +From 910a578f7e9400a78a3b13aba0b4d2df16a2cb05 Mon Sep 17 00:00:00 2001 +From: "Michael S. Tsirkin" +Date: Wed, 24 Oct 2012 20:37:51 +0200 +Subject: vhost: fix mergeable bufs on BE hosts + +From: "Michael S. Tsirkin" + +commit 910a578f7e9400a78a3b13aba0b4d2df16a2cb05 upstream. + +We copy head count to a 16 bit field, this works by chance on LE but on +BE guest gets 0. Fix it up. + +Signed-off-by: Michael S. Tsirkin +Tested-by: Alexander Graf +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/vhost/net.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/vhost/net.c ++++ b/drivers/vhost/net.c +@@ -376,7 +376,8 @@ static void handle_rx(struct vhost_net * + .hdr.gso_type = VIRTIO_NET_HDR_GSO_NONE + }; + size_t total_len = 0; +- int err, headcount, mergeable; ++ int err, mergeable; ++ s16 headcount; + size_t vhost_hlen, sock_hlen; + size_t vhost_len, sock_len; + /* TODO: check that we are running from vhost_worker? */ -- 2.47.3