diff options
author | Coiby Xu <coiby.xu@gmail.com> | 2020-09-18 16:09:07 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-10-23 13:42:16 +0100 |
commit | f1baeee9ffeddcc068d3536f90b5c3e9f81d9309 (patch) | |
tree | d018a9ca2db9e3a0277af5cb508819abf4435024 /contrib/libvhost-user | |
parent | 049f55502a020f2d56dece94164bf8cf901f855d (diff) | |
download | qemu-f1baeee9ffeddcc068d3536f90b5c3e9f81d9309.zip qemu-f1baeee9ffeddcc068d3536f90b5c3e9f81d9309.tar.gz qemu-f1baeee9ffeddcc068d3536f90b5c3e9f81d9309.tar.bz2 |
libvhost-user: remove watch for kick_fd when de-initialize vu-dev
When the client is running in gdb and quit command is run in gdb,
QEMU will still dispatch the event which will cause segment fault in
the callback function.
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20200918080912.321299-3-coiby.xu@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'contrib/libvhost-user')
-rw-r--r-- | contrib/libvhost-user/libvhost-user.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index 09bdff1..bfec8a8 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -1918,6 +1918,7 @@ vu_deinit(VuDev *dev) } if (vq->kick_fd != -1) { + dev->remove_watch(dev, vq->kick_fd); close(vq->kick_fd); vq->kick_fd = -1; } |