vsock: track pkt owner vsock

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>
This commit is contained in:
Peng Tao 2017-03-15 09:32:14 +08:00 committed by David S. Miller
parent 8a0f5ccfb3
commit 36d277bac8
2 changed files with 10 additions and 0 deletions

View file

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