diff options
author | Denis Plotnikov <den-plotnikov@yandex-team.ru> | 2021-03-25 18:12:17 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-04-01 11:39:12 -0400 |
commit | 2b7d06c452014c88a13eec3a13b996aa3e9e2331 (patch) | |
tree | ef988274646d505d642c7164165a3776fccfcefa /qemu-io-cmds.c | |
parent | bc79c87bcde6587a37347f81332fbb0cd6b14b85 (diff) |
vhost-user-blk: add immediate cleanup on shutdown
Qemu crashes on shutdown if the chardev used by vhost-user-blk has been
finalized before the vhost-user-blk.
This happens with char-socket chardev operating in the listening mode (server).
The char-socket chardev emits "close" event at the end of finalizing when
its internal data is destroyed. This calls vhost-user-blk event handler
which in turn tries to manipulate with destroyed chardev by setting an empty
event handler for vhost-user-blk cleanup postponing.
This patch separates the shutdown case from the cleanup postponing removing
the need to set an event handler.
Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru>
Message-Id: <20210325151217.262793-4-den-plotnikov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qemu-io-cmds.c')
0 files changed, 0 insertions, 0 deletions