From: Wei Liu <wei.liu2@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 4/4] tools/libxl: Initialise the fd of the unused half of a datacopier
Date: Fri, 17 Jul 2015 17:55:36 +0100 [thread overview]
Message-ID: <20150717165536.GT12455@zion.uk.xensource.com> (raw)
In-Reply-To: <1437151878-11792-5-git-send-email-andrew.cooper3@citrix.com>
On Fri, Jul 17, 2015 at 05:51:18PM +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@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> ---
> 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..47f71c0 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->readfd = -1;
writefd
> dc->maxsz = -1;
> dc->readbuf = stream->emu_body + sizeof(*ehdr);
> dc->bytes_to_read = rec->length - sizeof(*ehdr);
> --
> 1.7.10.4
next prev parent reply other threads:[~2015-07-17 16:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 16:51 [PATCH 0/4] Fix to libxl migration v2 issue blocking OSSTest Andrew Cooper
2015-07-17 16:51 ` [PATCH 1/4] tools/libxc: Identify the path of the kernel image which cannot be found Andrew Cooper
2015-07-17 16:53 ` Ian Campbell
2015-07-17 16:55 ` Wei Liu
2015-07-17 16:51 ` [PATCH 2/4] tools/libxl: Log the subject fd in datacopier messages Andrew Cooper
2015-07-20 9:54 ` Wei Liu
2015-07-17 16:51 ` [PATCH 3/4] tools/libxl: Identify copywhat in stream v2 datacopiers Andrew Cooper
2015-07-20 9:55 ` Wei Liu
2015-07-17 16:51 ` [PATCH 4/4] tools/libxl: Initialise the fd of the unused half of a datacopier Andrew Cooper
2015-07-17 16:55 ` Ian Campbell
2015-07-17 16:55 ` Wei Liu [this message]
2015-07-17 16:56 ` Andrew Cooper
2015-07-17 16:59 ` [PATCH v2 " Andrew Cooper
2015-07-17 17:01 ` Wei Liu
2015-07-17 17:11 ` Ian Campbell
2015-07-17 17:11 ` Andrew Cooper
2015-07-20 9:56 ` [PATCH 0/4] Fix to libxl migration v2 issue blocking OSSTest Wei Liu
2015-07-20 10:11 ` Andrew Cooper
2015-07-21 12:49 ` Wei Liu
2015-07-21 14:51 ` Ian Campbell
2015-07-21 15:05 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150717165536.GT12455@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).