diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 6bca57896915..e6ba768ab01c 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -516,6 +516,8 @@ static int vhost_vsock_dev_open(struct inode *inode, struct file *file) goto out; } + vsock->guest_cid = 0; /* no CID assigned yet */ + atomic_set(&vsock->queued_replies, 0); vqs[VSOCK_VQ_TX] = &vsock->vqs[VSOCK_VQ_TX];