mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
0931304788
commit
f3db17b951
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue