<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From c653f9a3938b8f8ee3c054c23afa5d838b6be41b Mon Sep 17 00:00:00 2001
Message-Id: &lt;c653f9a3938b8f8ee3c054c23afa5d838b6be41b.1376387172.git.minovotn@redhat.com&gt;
In-Reply-To: &lt;f0474e57abf884b69c3682cd37daaca892347bda.1376387172.git.minovotn@redhat.com&gt;
References: &lt;f0474e57abf884b69c3682cd37daaca892347bda.1376387172.git.minovotn@redhat.com&gt;
From: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Date: Thu, 8 Aug 2013 12:40:31 +0200
Subject: [PATCH 12/13] qemu-char: Fix ID reuse after chardev-remove for
 qapi-based init

RH-Author: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Message-id: &lt;1375965631-5025-2-git-send-email-kraxel@redhat.com&gt;
Patchwork-id: 53101
O-Subject: [RHEL-6.5 qemu-kvm PATCH 1/1] qemu-char: Fix ID reuse after chardev-remove for qapi-based init
Bugzilla: 994891
RH-Acked-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
RH-Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
RH-Acked-by: Bandan Das &lt;bsd@redhat.com&gt;

From: Markus Armbruster &lt;armbru@redhat.com&gt;

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 &lt;armbru@redhat.com&gt;
Reviewed-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Message-id: 1372339512-28149-1-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori &lt;aliguori@us.ibm.com&gt;
(cherry picked from commit 2ea3e2c1e85097c45a882dbc1fbba4a7fdb3ff1c)
---
 qemu-char.c |    1 +
 1 file changed, 1 insertion(+)

Signed-off-by: Michal Novotny &lt;minovotn@redhat.com&gt;
---
 qemu-char.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-char.c b/qemu-char.c
index 3d2037c..08467fb 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2911,6 +2911,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
         }
 
         chr = qemu_chr_find(id);
+        chr-&gt;opts = opts;
 
     qapi_out:
         if (!backend-&gt;data) {
-- 
1.7.11.7

</pre></body></html>