Revert "virtio/vsock: remove redundant 'skb_pull()' call"

This reverts commit 883a3db221 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 <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-11-29 13:00:12 +00:00
parent 5b9223a56f
commit 497503c6ec

View file

@ -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);