xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxl: fix POLLHUP handling
@ 2016-03-31 12:50 Roger Pau Monne
  2016-04-05 15:12 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Roger Pau Monne @ 2016-03-31 12:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson, Roger Pau Monne

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(-)

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)


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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libxl: fix POLLHUP handling
  2016-03-31 12:50 [PATCH] libxl: fix POLLHUP handling Roger Pau Monne
@ 2016-04-05 15:12 ` Wei Liu
  2016-04-06 13:48   ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-04-05 15:12 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Wei Liu

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)
> 

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libxl: fix POLLHUP handling
  2016-04-05 15:12 ` Wei Liu
@ 2016-04-06 13:48   ` Ian Jackson
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2016-04-06 13:48 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Roger Pau Monne

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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-06 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 12:50 [PATCH] libxl: fix POLLHUP handling Roger Pau Monne
2016-04-05 15:12 ` Wei Liu
2016-04-06 13:48   ` Ian Jackson

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).