Daniel De Graaf
2011-Oct-31 18:38 UTC
[Xen-devel] [PATCH] xenstored: Fix processing of zero-length messages
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> --- tools/xenstore/xenstored_core.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 5d308ca..9e6c2c7 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -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, -- 1.7.6.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vasiliy Tolstov
2011-Nov-01 04:18 UTC
Re: [Xen-devel] [PATCH] xenstored: Fix processing of zero-length messages
Thanks! Can somebody check ocaml oxenstored for deadlocks when incorrect messages sent to xenstore? 2011/10/31 Daniel De Graaf <dgdegra@tycho.nsa.gov>> 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> > --- > tools/xenstore/xenstored_core.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/tools/xenstore/xenstored_core.c > b/tools/xenstore/xenstored_core.c > index 5d308ca..9e6c2c7 100644 > --- a/tools/xenstore/xenstored_core.c > +++ b/tools/xenstore/xenstored_core.c > @@ -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, > -- > 1.7.6.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- Vasiliy Tolstov, Clodo.ru e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Nov-01 18:25 UTC
Re: [Xen-devel] [PATCH] xenstored: Fix processing of zero-length messages
Daniel De Graaf writes ("[Xen-devel] [PATCH] xenstored: Fix processing of zero-length messages"):> 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> Thanks Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Nov-01 18:27 UTC
Re: [Xen-devel] [PATCH] xenstored: Fix processing of zero-length messages
Vasiliy Tolstov writes ("Re: [Xen-devel] [PATCH] xenstored: Fix processing of zero-length messages"):> Thanks! Can somebody check ocaml oxenstored for deadlocks when incorrect > messages sent to xenstore?Do you have some reason to think oxenstored has a bug in this area ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel