FAILED: patch "[PATCH] vhost/vsock: fix incorrect used length reported to the guest" failed to apply to 4.9-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 49d8c5ffad07ca014cfae72a1b9b8c52b6ad9cb8 Mon Sep 17 00:00:00 2001
From: Stefano Garzarella <[email protected]>
Date: Mon, 22 Nov 2021 17:35:24 +0100
Subject: [PATCH] vhost/vsock: fix incorrect used length reported to the guest
The "used length" reported by calling vhost_add_used() must be the number of bytes written by the device (using "in" buffers).
In vhost_vsock_handle_tx_kick() the device only reads the guest buffers (they are all "out" buffers), without writing anything, so we must pass 0 as "used length" to comply virtio spec.
drivers/vhost/vsock.c +1 -1
@@ -554,7 +554,7 @@ static void vhost_vsock_handle_tx_kick(struct vhost_work *work)virtio_transport_free_pkt (pkt); len +=sizeof (pkt->hdr); -vhost_add_used (vq, head, len); +vhost_add_used (vq, head,0 ); total_len += len; added = true; }while (likely (!vhost_exceeds_weight (vq, ++pkts, total_len)));
Stefano Garzarella
maintainerQuoted 5 lines · On Mon, Nov 29, 2021 at 08:16:23AM +0100, [email protected] wrote:
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
I'll send the backport for 4.9-stable.
Thanks,
Stefano