[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: Shutdown vhost-user connecti
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: Shutdown vhost-user connection when wrong messages are passed |
Date: |
Thu, 6 Aug 2015 19:29:06 +0200 |
Hi
On Mon, Jun 22, 2015 at 5:50 AM, Tetsuya Mukawa <address@hidden> wrote:
> When wrong vhost-user message are passed, the connection should be shutdown.
>
> Signed-off-by: Tetsuya Mukawa <address@hidden>
> ---
> hw/virtio/vhost-user.c | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index d6f2163..2215c39 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -183,6 +183,7 @@ static int vhost_user_write(struct vhost_dev *dev,
> VhostUserMsg *msg,
> static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
...
> +close:
> + qemu_chr_disconnect(chr);
> + return -1;
> }
Many vhost_call() are followed by an assert(). You'll want to change
this if you want to make vhost-user robust against disconnect.
--
Marc-André Lureau
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: Shutdown vhost-user connection when wrong messages are passed,
Marc-André Lureau <=