qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] qemu-char: Fix ID reuse after chardev-remove for qapi-based init
@ 2013-06-27 13:25 Markus Armbruster
  2013-06-27 13:33 ` Gerd Hoffmann
  2013-07-01 13:14 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Armbruster @ 2013-06-27 13:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, kraxel, qemu-stable

Commit 2c5f488 introduced qapi-based character device initialization
as a new code path in qemu_chr_new_from_opts().  Unfortunately, it
failed to store parameter opts in the new chardev.  Therefore,
qemu_chr_delete() doesn't delete it.  Even though the device is gone,
its options linger, and any attempt to create another one with the
same ID fails.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu-char.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-char.c b/qemu-char.c
index a030e6b..63972ae 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3219,6 +3219,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
         }
 
         chr = qemu_chr_find(id);
+        chr->opts = opts;
 
     qapi_out:
         qapi_free_ChardevBackend(backend);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-01 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 13:25 [Qemu-devel] [PATCH 1/1] qemu-char: Fix ID reuse after chardev-remove for qapi-based init Markus Armbruster
2013-06-27 13:33 ` Gerd Hoffmann
2013-07-01 13:14 ` Anthony Liguori

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).