From db612631b7a0a32439cd1901fd303a33728b9aba Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 29 Nov 2023 12:58:13 +0000 Subject: [PATCH] Revert "virtio/vsock: fix header length on skb merging" This reverts commit 830c11c9c085154b3d2ec827739c8c3940743b88 which is commit f7154d967bc4ee25ea1572937550e711b2525474 upstream. It needs to be reverted, as the function virtio_transport_free_pkt() is in the stable Android ABI, and this function is removed in the 6.1.63 kernel as part of a series of fixes and optimizations of the virtio networking connection. To preserve the ABI (and thereby keeping the slower interface), revert the commit for now. If this needs to come back in the future, if performance for this interface needs to be resolved, it can be done so in an ABI-safe way. Bug: 161946584 Change-Id: I5d7ea0bc99094712815a8f1a13a0db4278e7e980 Signed-off-by: Greg Kroah-Hartman --- net/vmw_vsock/virtio_transport_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 828dfaf1159f..96058be4b5d6 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -1079,7 +1079,7 @@ virtio_transport_recv_enqueue(struct vsock_sock *vsk, memcpy(skb_put(last_skb, skb->len), skb->data, skb->len); free_pkt = true; last_hdr->flags |= hdr->flags; - le32_add_cpu(&last_hdr->len, len); + last_hdr->len = cpu_to_le32(last_skb->len); goto out; } }