* [Qemu-devel] [PULL 0/2] vfio fixes
@ 2015-02-04 19:09 Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list Alex Williamson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alex Williamson @ 2015-02-04 19:09 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.williamson
The following changes since commit ec6f25e788ef57ce1e9f734984ef8885172fd9e2:
Merge remote-tracking branch 'remotes/rth/tags/pull-tg-s390-20150203' into staging (2015-02-03 21:37:16 +0000)
are available in the git repository at:
git://github.com/awilliam/qemu-vfio.git tags/vfio-update-20150204.0
for you to fetch changes up to 3a4dbe6aa934370a92372528c1255ee1504965ee:
vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion (2015-02-04 11:45:32 -0700)
----------------------------------------------------------------
VFIO fixes:
- Fix wrong initializer (Chen Fan)
- Add missing object_unparent (Alex Williamson)
----------------------------------------------------------------
Alex Williamson (1):
vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion
Chen Fan (1):
vfio: fix wrong initialize vfio_group_list
hw/vfio/common.c | 2 +-
hw/vfio/pci.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list
2015-02-04 19:09 [Qemu-devel] [PULL 0/2] vfio fixes Alex Williamson
@ 2015-02-04 19:09 ` Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 2/2] vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion Alex Williamson
2015-02-05 11:11 ` [Qemu-devel] [PULL 0/2] vfio fixes Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Alex Williamson @ 2015-02-04 19:09 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.williamson
From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/vfio/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index cf483ff..e71385e 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -32,7 +32,7 @@
#include "trace.h"
struct vfio_group_head vfio_group_list =
- QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+ QLIST_HEAD_INITIALIZER(vfio_group_list);
struct vfio_as_head vfio_address_spaces =
QLIST_HEAD_INITIALIZER(vfio_address_spaces);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion
2015-02-04 19:09 [Qemu-devel] [PULL 0/2] vfio fixes Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list Alex Williamson
@ 2015-02-04 19:09 ` Alex Williamson
2015-02-05 11:11 ` [Qemu-devel] [PULL 0/2] vfio fixes Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Alex Williamson @ 2015-02-04 19:09 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.williamson
Commit d8d95814609e added explicit object_unparent() calls for
dynamically allocated MemoryRegions. The VFIOMSIXInfo structure also
contains such a MemoryRegion, covering the mmap'd region of a PCI BAR
above the MSI-X table. This structure is freed as part of the class
exit function and therefore also needs an explicit object_unparent().
Failing to do this results in random segfaults due to fields within
the structure, often the class pointer, being reclaimed and corrupted
by the time object_finalize_child_property() is called for the object.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org # 2.2
---
hw/vfio/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 014a92c..29caabc 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3065,6 +3065,7 @@ static void vfio_put_device(VFIOPCIDevice *vdev)
{
g_free(vdev->vbasedev.name);
if (vdev->msix) {
+ object_unparent(OBJECT(&vdev->msix->mmap_mem));
g_free(vdev->msix);
vdev->msix = NULL;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] vfio fixes
2015-02-04 19:09 [Qemu-devel] [PULL 0/2] vfio fixes Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 2/2] vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion Alex Williamson
@ 2015-02-05 11:11 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-02-05 11:11 UTC (permalink / raw)
To: Alex Williamson; +Cc: QEMU Developers
On 4 February 2015 at 19:09, Alex Williamson <alex.williamson@redhat.com> wrote:
> The following changes since commit ec6f25e788ef57ce1e9f734984ef8885172fd9e2:
>
> Merge remote-tracking branch 'remotes/rth/tags/pull-tg-s390-20150203' into staging (2015-02-03 21:37:16 +0000)
>
> are available in the git repository at:
>
> git://github.com/awilliam/qemu-vfio.git tags/vfio-update-20150204.0
>
> for you to fetch changes up to 3a4dbe6aa934370a92372528c1255ee1504965ee:
>
> vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion (2015-02-04 11:45:32 -0700)
>
> ----------------------------------------------------------------
> VFIO fixes:
> - Fix wrong initializer (Chen Fan)
> - Add missing object_unparent (Alex Williamson)
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-05 11:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 19:09 [Qemu-devel] [PULL 0/2] vfio fixes Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list Alex Williamson
2015-02-04 19:09 ` [Qemu-devel] [PULL 2/2] vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion Alex Williamson
2015-02-05 11:11 ` [Qemu-devel] [PULL 0/2] vfio fixes Peter Maydell
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).