xenstored: Fix processing of zero-length messages
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Tue, 1 Nov 2011 18:25:17 +0000 (18:25 +0000)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Tue, 1 Nov 2011 18:25:17 +0000 (18:25 +0000)
When a message with zero length is sent to xenstore, the body of the
message was not processed until the socket or ring had more data to
read; this will cause deadlocks if the requestor is waiting on a
response to continue.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xenstore/xenstored_core.c

index 5d308cad86f63cf7f4707261235860af8efc6061..9e6c2c7baf96b49f97f8dac5ceee4508f7c91ef5 100644 (file)
@@ -1297,7 +1297,6 @@ static void handle_input(struct connection *conn)
                        goto bad_client;
                in->used = 0;
                in->inhdr = false;
-               return;
        }
 
        bytes = conn->read(conn, in->buffer + in->used,