[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Make xenstored EOF-safe
Xen-unstable 15643 introduced this bug, but it should have been fixed satisfactorily by 15644 I think? The idea being that the read hook function is responsible for turning EOF into an explicit error with rc==-1. -- Keir On 27/11/07 15:00, "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx> wrote: > As bug 968 suggests, xenstored must properly handle EOF from clients. > > From: Pavel Kankovsky <peak@xxxxxxxxxxxxxxxxxxxxxx> > Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxx> > > diff -r 6fd17d0dcbcd tools/xenstore/xenstored_core.c > --- a/tools/xenstore/xenstored_core.c Tue Nov 27 12:49:16 2007 +0000 > +++ b/tools/xenstore/xenstored_core.c Tue Nov 27 14:56:35 2007 +0000 > @@ -1266,7 +1266,7 @@ static void handle_input(struct connecti > if (in->inhdr) { > bytes = conn->read(conn, in->hdr.raw + in->used, > sizeof(in->hdr) - in->used); > - if (bytes < 0) > + if (bytes <= 0) > goto bad_client; > in->used += bytes; > if (in->used != sizeof(in->hdr)) > @@ -1288,7 +1288,7 @@ static void handle_input(struct connecti > > bytes = conn->read(conn, in->buffer + in->used, > in->hdr.msg.len - in->used); > - if (bytes < 0) > + if (bytes <= 0) > goto bad_client; > > in->used += bytes; > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |