From: Avi Kivity <avi@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Alexander Graf <agraf@suse.de>, Blue Swirl <blauwirbel@gmail.com>,
Alex Williamson <alex.williamson@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: [Qemu-devel] [PATCH v2 1/7] memory: fix address space initialization/destruction
Date: Tue, 30 Oct 2012 13:47:44 +0200 [thread overview]
Message-ID: <1351597670-23031-2-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1351597670-23031-1-git-send-email-avi@redhat.com>
A couple of fields were left uninitialized. This was not observed earlier
because all address spaces were statically allocated. Also free allocation
for those fields.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/memory.c b/memory.c
index 243cb23..ae3552b 100644
--- a/memory.c
+++ b/memory.c
@@ -1541,6 +1541,8 @@ void address_space_init(AddressSpace *as, MemoryRegion *root)
as->root = root;
as->current_map = g_new(FlatView, 1);
flatview_init(as->current_map);
+ as->ioeventfd_nb = 0;
+ as->ioeventfds = NULL;
QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);
as->name = NULL;
memory_region_transaction_commit();
@@ -1557,6 +1559,7 @@ void address_space_destroy(AddressSpace *as)
address_space_destroy_dispatch(as);
flatview_destroy(as->current_map);
g_free(as->current_map);
+ g_free(as->ioeventfds);
}
uint64_t io_mem_read(MemoryRegion *mr, hwaddr addr, unsigned size)
--
1.7.12
next prev parent reply other threads:[~2012-10-30 11:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 11:47 [Qemu-devel] [PATCH v2 0/7] IOMMU support Avi Kivity
2012-10-30 11:47 ` Avi Kivity [this message]
2012-10-30 11:47 ` [Qemu-devel] [PATCH v2 2/7] memory: limit sections in the radix tree to the actual address space size Avi Kivity
2012-10-30 11:47 ` [Qemu-devel] [PATCH v2 3/7] memory: iommu support Avi Kivity
2012-10-30 19:11 ` Blue Swirl
2012-10-30 20:03 ` Benjamin Herrenschmidt
2012-10-30 21:13 ` Blue Swirl
2012-10-31 10:32 ` Avi Kivity
2012-10-31 18:59 ` Benjamin Herrenschmidt
2012-11-01 13:44 ` Avi Kivity
2012-11-01 13:45 ` Avi Kivity
2012-10-30 11:47 ` [Qemu-devel] [PATCH v2 4/7] memory: provide a MemoryRegion for IOMMUs to log faults Avi Kivity
2012-10-30 19:14 ` Blue Swirl
2012-10-31 10:33 ` Avi Kivity
2012-10-30 11:47 ` [Qemu-devel] [PATCH v2 5/7] pci: use memory core for iommu support Avi Kivity
2012-10-30 11:47 ` [Qemu-devel] [PATCH v2 6/7] vfio: abort if an emulated iommu is used Avi Kivity
2012-10-30 11:47 ` [Qemu-devel] [PATCH v2 7/7] i440fx: add an iommu Avi Kivity
2012-10-30 19:18 ` Blue Swirl
2012-10-31 10:34 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351597670-23031-2-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).