projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6167ebb
)
qemu-char: make tcp_chr_disconnect() reentrant-safe
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Tue, 23 Feb 2016 18:10:53 +0000
(19:10 +0100)
committer
Michael S. Tsirkin
<mst@redhat.com>
Fri, 11 Mar 2016 14:59:12 +0000
(16:59 +0200)
During CHR_EVENT_CLOSED, the function could be reentered, make this
case safe.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
qemu-char.c
patch
|
blob
|
history
diff --git
a/qemu-char.c
b/qemu-char.c
index 3813efdf1986da33d45c65f60d5d8064e622fe55..27fbb440acae99ba7d9ce3dda980500766050515 100644
(file)
--- a/
qemu-char.c
+++ b/
qemu-char.c
@@
-2769,6
+2769,10
@@
static void tcp_chr_disconnect(CharDriverState *chr)
{
TCPCharDriver *s = chr->opaque;
+ if (!s->connected) {
+ return;
+ }
+
s->connected = 0;
if (s->listen_ioc) {
s->listen_tag = qio_channel_add_watch(