[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/32] monitor: Prevent removing fd from set during
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 14/32] monitor: Prevent removing fd from set during init |
Date: |
Wed, 24 Oct 2012 11:50:38 +0200 |
From: Corey Bryant <address@hidden>
If an fd is added to an fd set via the command line, and it is not
referenced by another command line option (ie. -drive), then clean
it up after QEMU initialization is complete.
Signed-off-by: Corey Bryant <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
monitor.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/monitor.c b/monitor.c
index 6e99049..1d3dd9a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2105,8 +2105,9 @@ static void monitor_fdset_cleanup(MonFdset *mon_fdset)
MonFdsetFd *mon_fdset_fd_next;
QLIST_FOREACH_SAFE(mon_fdset_fd, &mon_fdset->fds, next, mon_fdset_fd_next)
{
- if (mon_fdset_fd->removed ||
- (QLIST_EMPTY(&mon_fdset->dup_fds) && mon_refcount == 0)) {
+ if ((mon_fdset_fd->removed ||
+ (QLIST_EMPTY(&mon_fdset->dup_fds) && mon_refcount == 0)) &&
+ runstate_is_running()) {
close(mon_fdset_fd->fd);
g_free(mon_fdset_fd->opaque);
QLIST_REMOVE(mon_fdset_fd, next);
--
1.7.6.5
- [Qemu-devel] [PATCH 02/32] qemu-iotests: Test qemu-img operation on zero size image, (continued)
- [Qemu-devel] [PATCH 02/32] qemu-iotests: Test qemu-img operation on zero size image, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 05/32] block: make bdrv_find_backing_image compare canonical filenames, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 03/32] qmp: fix __accept() in qmp.py, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 07/32] qemu-iotests: add relative backing file tests for block-commit (040), Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 04/32] qemu-img rebase: use empty string to rebase without backing file, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 08/32] qemu-img: Add --backing-chain option to info command, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 06/32] block: in commit, determine base image from the top image, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 12/32] monitor: Allow add-fd to any specified fd set, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 10/32] qemu-img: document 'info --backing-chain', Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 11/32] block: bdrv_create(): don't leak cco.filename on error, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 14/32] monitor: Prevent removing fd from set during init,
Kevin Wolf <=
- [Qemu-devel] [PATCH 09/32] qemu-iotests: Add 043 backing file chain infinite loop test, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 17/32] block: add bdrv_query_stats, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 15/32] qemu-config: Add new -add-fd command line option, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 19/32] block: introduce new dirty bitmap functionality, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 21/32] block: rename block_job_complete to block_job_completed, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 13/32] monitor: Enable adding an inherited fd to an fd set, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 22/32] block: add block-job-complete, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 16/32] block: add bdrv_query_info, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 18/32] block: add bdrv_open_backing_file, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 20/32] block: export dirty bitmap information in query-block, Kevin Wolf, 2012/10/24