mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "virtio/vsock: fix leaks due to missing skb owner"
This reverts commita6650e78c4which is commitf9d2b1e146upstream. 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: Ia3ece70e6ced0b779c911cb47aa133c2d378aa82 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -98,11 +98,6 @@ virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info,
|
||||
info->op,
|
||||
info->flags);
|
||||
|
||||
if (info->vsk && !skb_set_owner_sk_safe(skb, sk_vsock(info->vsk))) {
|
||||
WARN_ONCE(1, "failed to allocate skb on vsock socket with sk_refcnt == 0\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
return skb;
|
||||
|
||||
out:
|
||||
@@ -1311,11 +1306,6 @@ void virtio_transport_recv_pkt(struct virtio_transport *t,
|
||||
goto free_pkt;
|
||||
}
|
||||
|
||||
if (!skb_set_owner_sk_safe(skb, sk)) {
|
||||
WARN_ONCE(1, "receiving vsock socket has sk_refcnt == 0\n");
|
||||
goto free_pkt;
|
||||
}
|
||||
|
||||
vsk = vsock_sk(sk);
|
||||
|
||||
lock_sock(sk);
|
||||
|
||||
Reference in New Issue
Block a user