[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 27/29] char: ensure all clients are in non-blocking m
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 27/29] char: ensure all clients are in non-blocking mode |
Date: |
Tue, 22 Mar 2016 15:17:07 +0100 |
From: "Daniel P. Berrange" <address@hidden>
Only some callers of tcp_chr_new_client are putting the
socket client into non-blocking mode. Move the call to
qio_channel_set_blocking() into the tcp_chr_new_client
method to guarantee that all code paths set non-blocking
mode
Reported-by: Andrew Baumann <address@hidden>
Reported-by: Laurent Vivier <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
qemu-char.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qemu-char.c b/qemu-char.c
index 270819a..1944c4e 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3081,6 +3081,8 @@ static int tcp_chr_new_client(CharDriverState *chr,
QIOChannelSocket *sioc)
s->sioc = sioc;
object_ref(OBJECT(sioc));
+ qio_channel_set_blocking(s->ioc, false, NULL);
+
if (s->do_nodelay) {
qio_channel_set_delay(s->ioc, false);
}
@@ -3112,7 +3114,6 @@ static int tcp_chr_add_client(CharDriverState *chr, int
fd)
if (!sioc) {
return -1;
}
- qio_channel_set_blocking(QIO_CHANNEL(sioc), false, NULL);
ret = tcp_chr_new_client(chr, sioc);
object_unref(OBJECT(sioc));
return ret;
--
2.5.0
- [Qemu-devel] [PULL 19/29] qemu-log: Improve the "exec" TB execution logging, (continued)
- [Qemu-devel] [PULL 19/29] qemu-log: Improve the "exec" TB execution logging, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 17/29] qemu-log: correct help text for -d cpu, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 23/29] qemu-log: support simple pid substitution for logs, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 22/29] target-arm: dfilter support for in_asm, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 26/29] char: translate from QIOChannel error to errno, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 15/29] util: move declarations out of qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 25/29] exec: fix error handling in file_ram_alloc, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 24/29] cputlb: modernise the debug support, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 28/29] config.status: Pass extra parameters, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 29/29] target-i386: implement PKE for TCG, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 27/29] char: ensure all clients are in non-blocking mode,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 00/29] Miscellaneous changes for 2016-03-22, Peter Maydell, 2016/03/22