mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "virtio/vsock: don't drop skbuff on copy failure"
This reverts commit1e5f00e9dbwhich is commit8daaf39f7fupstream. 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: Ie929bb2fbb4e3dc3cadc1e0d3b63ed8e83257a4a Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -368,7 +368,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk,
|
||||
|
||||
spin_lock_bh(&vvs->rx_lock);
|
||||
while (total < len && !skb_queue_empty(&vvs->rx_queue)) {
|
||||
skb = skb_peek(&vvs->rx_queue);
|
||||
skb = __skb_dequeue(&vvs->rx_queue);
|
||||
|
||||
bytes = len - total;
|
||||
if (bytes > skb->len)
|
||||
@@ -392,8 +392,9 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk,
|
||||
u32 pkt_len = le32_to_cpu(virtio_vsock_hdr(skb)->len);
|
||||
|
||||
virtio_transport_dec_rx_pkt(vvs, pkt_len);
|
||||
__skb_unlink(skb, &vvs->rx_queue);
|
||||
consume_skb(skb);
|
||||
} else {
|
||||
__skb_queue_head(&vvs->rx_queue, skb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user