The save helper message reader does operates with the fd in blocking
mode.  So spurious wakeups could cause it to block, unless it takes
precautions.

Reported-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 tools/libxl/libxl_save_callout.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index 40b25e4..0f392ef 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -265,6 +265,8 @@ static void helper_stdout_readable(libxl__egc *egc, 
libxl__ev_fd *ev,
     STATE_AO_GC(shs->ao);
     int rc, errnoval;
 
+    revents = libxl__ev_fd_recheck(egc, ev);
+
     if (revents & (POLLERR|POLLPRI)) {
         LOG(ERROR, "%s signaled POLLERR|POLLPRI (%#x)",
             shs->stdout_what, revents);
-- 
1.7.10.4


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

Reply via email to