Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtio/vsock: fix leaks due to missing skb owner
commit f9d2b1e upstream. This patch sets the skb owner in the recv and send path for virtio. For the send path, this solves the leak caused when virtio_transport_purge_skbs() finds skb->sk is always NULL and therefore never matches it with the current socket. Setting the owner upon allocation fixes this. For the recv path, this ensures correctness of accounting and also correct transfer of ownership in vsock_loopback (when skbs are sent from one socket and received by another). Fixes: 71dc9ec ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") Signed-off-by: Bobby Eshleman <[email protected]> Reported-by: Cong Wang <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information