From patchwork Thu Mar 31 12:50:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8712671 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9F3029F38C for ; Thu, 31 Mar 2016 12:52:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8C24201B4 for ; Thu, 31 Mar 2016 12:52:45 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD5E720148 for ; Thu, 31 Mar 2016 12:52:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alc3E-00011G-3V; Thu, 31 Mar 2016 12:50:16 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alc3C-0000tA-SH for xen-devel@lists.xenproject.org; Thu, 31 Mar 2016 12:50:14 +0000 Received: from [193.109.254.147] by server-5.bemta-14.messagelabs.com id A0/DD-03497-60D1DF65; Thu, 31 Mar 2016 12:50:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42JxWrrBXpdV9m+ Ywfe1Zhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bXJ3OYCl6zVzTf3MjawLiarYuRk0NCwF/i 1P9JTCA2m4COxMW5O4HiHBwiAioSt/cagISZBYolvq7qYwWxhYFKehbMZwexWQRUJSatWQxm8 wo4S2xcPYMdYqSuxMndm6DighInZz5hgZijKdG6/Tc7hC0v0bx1NjOILSSgKNE/7wHYWgkBbo m/3fYTGHlnIemehaR7FpLuBYzMqxg1ilOLylKLdA0N9ZKKMtMzSnITM3OAPBO93NTi4sT01Jz EpGK95PzcTYzAgGIAgh2MZ1Y4H2KU5GBSEuU1F/wbJsSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC d5c0UE6wKDU9tSItMwcY2jBpCQ4eJRHeU1JAad7igsTc4sx0iNQpRkUpcd4ikD4BkERGaR5cG yyeLjHKSgnzMgIdIsRTkFqUm1mCKv+KUZyDUUmYdybIFJ7MvBK46a+AFjMBLd6q8QtkcUkiQk qqgVHlXrOg4DzR7BlCuVIq5kp/9230MFRmDzwVHPV6UcrNw9PvaubL3c+occ2xv8ZbeeCcxRr Vuk9lSx/01jbl1UvfyF1jOl/0756cVZw8ym+eT3/yI0R1z/9J0x5s971/KG1FmCeXVvg5nWMv YpeG/J9pFNxzg207z2eZTbK/PQ25GCezc8pPnqHEUpyRaKjFXFScCACWWQiSogIAAA== X-Env-Sender: prvs=8914c038b=roger.pau@citrix.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1459428612!34732500!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12157 invoked from network); 31 Mar 2016 12:50:13 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 31 Mar 2016 12:50:13 -0000 X-IronPort-AV: E=Sophos;i="5.24,422,1454976000"; d="scan'208";a="350400466" From: Roger Pau Monne To: Date: Thu, 31 Mar 2016 14:50:07 +0200 Message-ID: <1459428607-5028-1-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH] libxl: fix POLLHUP handling X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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é Suggested-by: Ian Jackson Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- 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; }