libvhost-user: return early on virtqueue errors
commitfd40901c82bb0d2946a9523ed8a5a7d0e2867fb6
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 21 Sep 2020 11:34:19 +0000 (21 12:34 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 29 Sep 2020 07:06:12 +0000 (29 03:06 -0400)
tree91d98b8d66e93839c5e79c0367e8bf6c36508896
parent2bc9e0da573f77b2f21cc6e4a681c31ddeccfd1d
libvhost-user: return early on virtqueue errors

vu_panic() is not guaranteed to exit the program. Return early when
errors are encountered.

Note that libvhost-user does not have an "unmap" operation for mapped
descriptors. Therefore it is correct to return without explicit cleanup.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200921113420.154378-2-stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
contrib/libvhost-user/libvhost-user.c