Skip to contentSkip to conversation

libxl: fix POLLHUP handling

PATCH Applied Roger Pau Monne 3 participants 3 messages Mar 31, 2016 – Apr 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: fix POLLHUP handling

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.

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>

---
 tools/libxl/libxl_bootloader.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/libxl/libxl_bootloader.c +1 -2
index 0ae074a..2cfc8cf 100644
@@ -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;
     }
Signature · 7 lines
2.6.4 (Apple Git-63)


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · 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.

Quoted 24 lines

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>

---
 tools/libxl/libxl_bootloader.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/libxl/libxl_bootloader.c +1 -2
index 0ae074a..2cfc8cf 100644
@@ -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;
     }
Signature · 1 line
2.6.4 (Apple Git-63)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Applied
#2 lore raw

Wei Liu writes ("Re: [PATCH] libxl: fix POLLHUP handling"):

Quoted 10 lines · Roger Pau Monne
Quoted 7 lines

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.

Queued, thanks.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel