Re: [PATCH] vhost/net: length miscalculation

From
Michael S. Tsirkin <mst@redhat.com>
Date
2015-01-08 08:08:41
Also in
kvm, lkml, virtualization
Reply to
Sergei Shtylyov, 2015-01-07
On Wed, Jan 07, 2015 at 11:58:00PM +0300, Sergei Shtylyov wrote:
Hello.

On 01/07/2015 11:55 AM, Michael S. Tsirkin wrote:
quoted
commit 8b38694a2dc8b18374310df50174f1e4376d6824
    vhost/net: virtio 1.0 byte swap
had this chunk:
-       heads[headcount - 1].len += datalen;
+       heads[headcount - 1].len = cpu_to_vhost32(vq, len - datalen);
quoted
This adds datalen with the wrong sign, causing guest panics.
quoted
Fixes: 8b38694a2dc8b18374310df50174f1e4376d6824
   The format of this tag assumes 12-digit SHA1 hash and the commit
description enclosed in parens and double quotes. See
Documentation/SubmittingPatches.
quoted
Reported-by: Alex Williamson <redacted>
Suggested-by: Greg Kurz <redacted>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
WBR, Sergei
I pushed the patches to Linus unfortunately - there's
some urgency since many people are hitting the bug.
Will do my best to do it right next time.

-- 
MST
Thread (4 messages) 4 messages, 3 authors, last reply 2015-01-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help