Message ID | 1459428607-5028-1-git-send-email-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Mar 31, 2016 at 02:50:07PM +0200, Roger Pau Monne wrote: > The current code in bootloader_copyfail will error out on expected POLLHUPs > because of a missing "else" in the if clause. > > The behaviour that triggers this bug has only been seen on FreeBSD so far. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> > Suggested-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> > --- > Cc: Ian Jackson <ian.jackson@eu.citrix.com> > Cc: Wei Liu <wei.liu2@citrix.com> > --- > tools/libxl/libxl_bootloader.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c > index 0ae074a..2cfc8cf 100644 > --- a/tools/libxl/libxl_bootloader.c > +++ b/tools/libxl/libxl_bootloader.c > @@ -591,8 +591,7 @@ static void bootloader_copyfail(libxl__egc *egc, const char *which, > } else { > LOG(ERROR, "unexpected POLLHUP on %s", which); > } > - } > - if (!rc) { > + } else if (!rc) { > LOG(ERROR, "unexpected eof copying %s", which); > rc = ERROR_FAIL; > } > -- > 2.6.4 (Apple Git-63) >
Wei Liu writes ("Re: [PATCH] libxl: fix POLLHUP handling"): > On Thu, Mar 31, 2016 at 02:50:07PM +0200, Roger Pau Monne wrote: > > The current code in bootloader_copyfail will error out on expected POLLHUPs > > because of a missing "else" in the if clause. > > > > The behaviour that triggers this bug has only been seen on FreeBSD so far. > > > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> > > Suggested-by: Ian Jackson <Ian.Jackson@eu.citrix.com> > > Acked-by: Wei Liu <wei.liu2@citrix.com> Queued, thanks. Ian.
diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index 0ae074a..2cfc8cf 100644 --- a/tools/libxl/libxl_bootloader.c +++ b/tools/libxl/libxl_bootloader.c @@ -591,8 +591,7 @@ static void bootloader_copyfail(libxl__egc *egc, const char *which, } else { LOG(ERROR, "unexpected POLLHUP on %s", which); } - } - if (!rc) { + } else if (!rc) { LOG(ERROR, "unexpected eof copying %s", which); rc = ERROR_FAIL; }
The current code in bootloader_copyfail will error out on expected POLLHUPs because of a missing "else" in the if clause. The behaviour that triggers this bug has only been seen on FreeBSD so far. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Suggested-by: Ian Jackson <Ian.Jackson@eu.citrix.com> --- Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> --- tools/libxl/libxl_bootloader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)