From 497503c6ec005364d3a291b394756e21cd050f87 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 29 Nov 2023 13:00:12 +0000 Subject: [PATCH] Revert "virtio/vsock: remove redundant 'skb_pull()' call" This reverts commit 883a3db2212c5a314bf515b74736b1051f93485d which is commit 6825e6b4f8e53799d83bc39ca6ec5baed4e2adde 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: I377797e7be1981ec41108b89c40d484197fd1082 Signed-off-by: Greg Kroah-Hartman --- net/vmw_vsock/virtio_transport_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 7f26869de762..eaecefc48f34 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -469,6 +469,7 @@ static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, dequeued_len = err; } else { user_buf_len -= bytes_to_copy; + skb_pull(skb, bytes_to_copy); } spin_lock_bh(&vvs->rx_lock);