Hi On Mon, Jun 22, 2015 at 5:50 AM, Tetsuya Mukawa <muk...@igel.co.jp> wrote: > When wrong vhost-user message are passed, the connection should be shutdown. > > Signed-off-by: Tetsuya Mukawa <muk...@igel.co.jp> > --- > 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