util/vhost-user-server: rework vu_client_trip() coroutine lifecycle
commit7185c8577653533ee89e7d070d77473096f0ff74
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 24 Sep 2020 15:15:45 +0000 (24 16:15 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 23 Oct 2020 12:42:16 +0000 (23 13:42 +0100)
treefbff907574b04ee435e2a01937f8202358d7012e
parentedaf6205a3a58e09bf31b7ebd73d8fc470e96e07
util/vhost-user-server: rework vu_client_trip() coroutine lifecycle

The vu_client_trip() coroutine is leaked during AioContext switching. It
is also unsafe to destroy the vu_dev in panic_cb() since its callers
still access it in some cases.

Rework the lifecycle to solve these safety issues.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200924151549.913737-10-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/export/vhost-user-blk-server.c
util/vhost-user-server.c
util/vhost-user-server.h