From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79925C433DF for ; Fri, 26 Jun 2020 10:18:36 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52A5920C09 for ; Fri, 26 Jun 2020 10:18:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52A5920C09 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jolQy-0001tP-Os; Fri, 26 Jun 2020 10:18:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jolQx-0001tK-Qd for xen-devel@lists.xenproject.org; Fri, 26 Jun 2020 10:18:11 +0000 X-Inumbo-ID: 561945f2-b796-11ea-8496-bc764e2007e4 Received: from mail-wr1-f66.google.com (unknown [209.85.221.66]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 561945f2-b796-11ea-8496-bc764e2007e4; Fri, 26 Jun 2020 10:18:11 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id r12so8887920wrj.13 for ; Fri, 26 Jun 2020 03:18:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=of9h1NRjUJ18XWncnHmChowLD1aeWLqQRvW9jUzW09g=; b=iXC+fnnk7RGdRdxzFXNpEJS9YgWaBwkD3Nh0tqXzrOXNQEd0Kv4QoDAYEloYDmb2/e MmMYU0H8/56y+vOBLtdHyIgz2n1hwlp6B/jzcnFJ+PcMjLckL6FF99HpRRvOo+5JdKWN 5lwPV6xmZCLxFP4MB48i+N7uel0dRTMFD+Su+Ibm8b+x7dyyD6XRitQCFsAIQQ+/IvdO SfV31KvQGjDq3SaQCRpdwjhMTXAM9WxVDOr+ESOu3wIqP53dP65IKcs6E3vftcY/62bR wtoqtVG/fsGFgkvOiY3iqoN0w2fZ3S+ieZ9DynWk/qGOFH4dMa0ySFMdXhrU5nCsYNBX Taxg== X-Gm-Message-State: AOAM531lgvH7lTXq70e9/9gl8RdTGjomAi0bWIxsXbEgJlQ//nfRJJXX gW9zO1EAxLoMkCHGrwp11Ys= X-Google-Smtp-Source: ABdhPJwArNzAXXiebnwjAp8s2NlujCinOyfLLMjqtdNZpgi6q2WyNY2b3B5Juk8KaeS2peSffeLuCA== X-Received: by 2002:a05:6000:1107:: with SMTP id z7mr2850448wrw.355.1593166690104; Fri, 26 Jun 2020 03:18:10 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id p17sm16150338wma.47.2020.06.26.03.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 03:18:09 -0700 (PDT) Date: Fri, 26 Jun 2020 10:18:07 +0000 From: Wei Liu To: Jason Andryuk Subject: Re: [PATCH v2 00/10] Coverity fixes for vchan-socket-proxy Message-ID: <20200626101807.za6arkdlah7zsjzc@liuwe-devbox-debian-v2> References: <20200611032936.350657-1-jandryuk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611032936.350657-1-jandryuk@gmail.com> User-Agent: NeoMutt/20180716 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, Ian Jackson , marmarek@invisiblethingslab.com, Wei Liu , Paul Durrant Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Jun 10, 2020 at 11:29:26PM -0400, Jason Andryuk wrote: > This series addresses some Coverity reports. To handle closing FDs, a > state struct is introduced to track FDs closed in both main() and > data_loop(). > > v2 changes "Ensure UNIX path NUL terminated" to avoid a warning with > gcc-10. Also, "Move perror() into listen_socket" and "Move perror() > into connect_socket" are new. > > Jason Andryuk (10): > vchan-socket-proxy: Ensure UNIX path NUL terminated > vchan-socket-proxy: Move perror() into listen_socket > vchan-socket-proxy: Move perror() into connect_socket > vchan-socket-proxy: Check xs_watch return value > vchan-socket-proxy: Unify main return value > vchan-socket-proxy: Use a struct to store state > vchan-socket-proxy: Switch data_loop() to take state > vchan-socket-proxy: Set closed FDs to -1 > vchan-socket-proxy: Cleanup resources on exit > vchan-socket-proxy: Handle closing shared input/output_fd Acked-by: Wei Liu Cc Paul. V1 of this series was posted back in May. I consider this series bug fixes, so they should be applied for 4.14. The risk is low because vchan-socket-proxy is a small utility used by a small number of users. Marek, you gave Review tags in v1. Do they still apply here? > > tools/libvchan/vchan-socket-proxy.c | 183 ++++++++++++++++++---------- > 1 file changed, 119 insertions(+), 64 deletions(-) > > -- > 2.25.1 >