[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 4/4] tools/libxl: Initialise the fd of the unused half of a datacopier



On Fri, Jul 17, 2015 at 05:59:09PM +0100, Andrew Cooper wrote:
> This bug causes a spurious failure if stdin happens to be an
> appropriately readable/writeable pipe which receives a POLLHUP
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> 

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

> ---
> Correct writefd in libxl_stream_write.c
> ---
>  tools/libxl/libxl_stream_read.c  |    1 +
>  tools/libxl/libxl_stream_write.c |    1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/tools/libxl/libxl_stream_read.c b/tools/libxl/libxl_stream_read.c
> index 3e1cd2a..32a3551 100644
> --- a/tools/libxl/libxl_stream_read.c
> +++ b/tools/libxl/libxl_stream_read.c
> @@ -611,6 +611,7 @@ static void write_emulator_blob(libxl__egc *egc,
>      dc->writewhat  = "qemu save file";
>      dc->copywhat   = "restore v2 stream";
>      dc->writefd    = writefd;
> +    dc->readfd     = -1;
>      dc->maxsz      = -1;
>      dc->callback   = write_emulator_done;
>  
> diff --git a/tools/libxl/libxl_stream_write.c 
> b/tools/libxl/libxl_stream_write.c
> index 94f681b..5bff52b 100644
> --- a/tools/libxl/libxl_stream_write.c
> +++ b/tools/libxl/libxl_stream_write.c
> @@ -389,6 +389,7 @@ static void write_emulator_record(libxl__egc *egc,
>      dc->readwhat      = "qemu save file";
>      dc->copywhat      = "save v2 stream";
>      dc->readfd        = readfd;
> +    dc->writefd       = -1;
>      dc->maxsz         = -1;
>      dc->readbuf       = stream->emu_body + sizeof(*ehdr);
>      dc->bytes_to_read = rec->length - sizeof(*ehdr);
> -- 
> 1.7.10.4

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.