From patchwork Wed Feb 3 10:43:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 8200301 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DABB9BEEE5 for ; Wed, 3 Feb 2016 10:46:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 198ED20221 for ; Wed, 3 Feb 2016 10:46:22 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FB9120212 for ; Wed, 3 Feb 2016 10:46:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQuui-0006Eq-RV; Wed, 03 Feb 2016 10:43:56 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQuuh-0006Ea-IW for xen-devel@lists.xen.org; Wed, 03 Feb 2016 10:43:55 +0000 Received: from [85.158.143.35] by server-3.bemta-4.messagelabs.com id 59/D5-31122-AE9D1B65; Wed, 03 Feb 2016 10:43:54 +0000 X-Env-Sender: prvs=8347a21d9=Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-21.messagelabs.com!1454496230!13708976!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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29412 invoked from network); 3 Feb 2016 10:43:54 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-15.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 3 Feb 2016 10:43:54 -0000 X-IronPort-AV: E=Sophos;i="5.22,389,1449532800"; d="scan'208";a="335770516" From: Ian Campbell To: , , Date: Wed, 3 Feb 2016 10:43:47 +0000 Message-ID: <1454496227-24376-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell Subject: [Xen-devel] [PATCH] tools: xenconsole: cleanup when clock_gettime fails. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 All other error paths in the infinite loop in handle_io use break, so as to free resources. CID: 1351226 Signed-off-by: Ian Campbell Acked-by: Wei Liu --- tools/console/daemon/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index e2e7a6b..34666c4 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -1053,7 +1053,7 @@ void handle_io(void) POLLIN|POLLPRI); if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) - return; + break; now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); /* Re-calculate any event counter allowances & unblock