aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-06-25 09:04:57 +0200
committerPeter Maydell <peter.maydell@linaro.org>2014-06-26 13:13:54 +0100
commitf3db17b9514b8d724f8d6111a9f9608ff8bad631 (patch)
tree13b47eb4326471092a672a7d916fb26ced9e0680 /qemu-char.c
parent0931304788ecac6c7871f570c7ac8407b54e30c6 (diff)
qemu-char: initialize chr_write_lock
Otherwise, Windows fails with a deadlock. Reported-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1403679897-11480-1-git-send-email-pbonzini@redhat.com Tested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-char.c b/qemu-char.c
index f6bdf2fae4..cbd6b9a025 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -94,6 +94,7 @@ static QTAILQ_HEAD(CharDriverStateHead, CharDriverState) chardevs =
CharDriverState *qemu_chr_alloc(void)
{
CharDriverState *chr = g_malloc0(sizeof(CharDriverState));
+ qemu_mutex_init(&chr->chr_write_lock);
return chr;
}