summaryrefslogtreecommitdiff
path: root/include/linux/virtio_vsock.h
diff options
context:
space:
mode:
authorPeng Tao <bergwolf@gmail.com>2017-03-15 09:32:14 +0800
committerAlistair Strachan <astrachan@google.com>2019-05-14 17:57:01 -0700
commit45b7ae6f4d24f17a3a698069f7083110407dc5fa (patch)
tree79eb99d5c6bcda1052217d3f8dcffa646bfc9d06 /include/linux/virtio_vsock.h
parent78a8383251060fd136295824dd55711b33f1c073 (diff)
UPSTREAM: vsock: track pkt owner vsock
[ Upstream commit 36d277bac8080202684e67162ebb157f16631581 ] So that we can cancel a queued pkt later if necessary. Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 6f1848e778d9a9f9dd89abee53d2a688277d1784) Bug: 121166534 Test: Ran cuttlefish with android-4.4 + vsock adb tunnel Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: I29b8bacf06eaf57a91291c1d088802c0dea7fed0
Diffstat (limited to 'include/linux/virtio_vsock.h')
-rw-r--r--include/linux/virtio_vsock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
index 9638bfeb0d1f..584f9a647ad4 100644
--- a/include/linux/virtio_vsock.h
+++ b/include/linux/virtio_vsock.h
@@ -48,6 +48,8 @@ struct virtio_vsock_pkt {
struct virtio_vsock_hdr hdr;
struct work_struct work;
struct list_head list;
+ /* socket refcnt not held, only use for cancellation */
+ struct vsock_sock *vsk;
void *buf;
u32 len;
u32 off;
@@ -56,6 +58,7 @@ struct virtio_vsock_pkt {
struct virtio_vsock_pkt_info {
u32 remote_cid, remote_port;
+ struct vsock_sock *vsk;
struct msghdr *msg;
u32 pkt_len;
u16 type;