From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, kraxel@redhat.com, armbru@redhat.com
Subject: [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them
Date: Wed, 25 Jun 2014 20:21:37 +0200 [thread overview]
Message-ID: <1403720497-5318-1-git-send-email-pbonzini@redhat.com> (raw)
Otherwise, hot-unplug of pci-serial-2x trips the assertion
in memory_region_destroy:
(qemu) device_del gg
(qemu) qemu-system-x86_64: /work/armbru/tmp/qemu/memory.c:1021: memory_region_destroy: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
Aborted (core dumped)
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/char/serial-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index 6c25296..7340c8d 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -148,6 +148,7 @@ static void multi_serial_pci_exit(PCIDevice *dev)
for (i = 0; i < pci->ports; i++) {
s = pci->state + i;
serial_exit_core(s);
+ memory_region_del_subregion(&pci->iobar, &s->io);
memory_region_destroy(&s->io);
g_free(pci->name[i]);
}
--
1.9.3
next reply other threads:[~2014-06-25 18:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 18:21 Paolo Bonzini [this message]
2014-06-26 7:32 ` [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them Markus Armbruster
2014-06-26 10:08 ` Paolo Bonzini
2014-07-14 12:36 ` Peter Crosthwaite
2014-07-14 14:20 ` Paolo Bonzini
2014-07-14 14:28 ` Peter Crosthwaite
2014-07-14 15:25 ` Markus Armbruster
2014-07-15 8:35 ` Gerd Hoffmann
2014-07-15 8:39 ` Paolo Bonzini
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=1403720497-5318-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).