[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 2/7] libvhost-user: remove watch for kick_fd when de-initiali
From: |
Coiby Xu |
Subject: |
[PATCH v10 2/7] libvhost-user: remove watch for kick_fd when de-initialize vu-dev |
Date: |
Fri, 18 Sep 2020 16:09:07 +0800 |
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>
---
contrib/libvhost-user/libvhost-user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/libvhost-user/libvhost-user.c
b/contrib/libvhost-user/libvhost-user.c
index 73732b928f..5fdfa64294 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -1909,6 +1909,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;
}
--
2.28.0
- [PATCH v10 0/7] vhost-user block device backend implementation, Coiby Xu, 2020/09/18
- [PATCH v10 1/7] libvhost-user: Allow vu_message_read to be replaced, Coiby Xu, 2020/09/18
- [PATCH v10 2/7] libvhost-user: remove watch for kick_fd when de-initialize vu-dev,
Coiby Xu <=
- [PATCH v10 3/7] util/vhost-user-server: generic vhost user server, Coiby Xu, 2020/09/18
- [PATCH v10 4/7] block: move logical block size check function to a common utility function, Coiby Xu, 2020/09/18
- [PATCH v10 5/7] block/export: vhost-user block device backend server, Coiby Xu, 2020/09/18
- [PATCH v10 6/7] test: new qTest case to test the vhost-user-blk-server, Coiby Xu, 2020/09/18
- [PATCH v10 7/7] MAINTAINERS: Add vhost-user block device backend server maintainer, Coiby Xu, 2020/09/18