From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95B5EA04BC for ; Thu, 17 Sep 2020 13:44:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A05C1D61B; Thu, 17 Sep 2020 13:44:34 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 3256F1D606; Thu, 17 Sep 2020 13:44:30 +0200 (CEST) IronPort-SDR: xY8O02p1ez4fve+5dzKO8LO+a5rkuziFWZ1fQjJCo9NACWC1uAaY2Lz2DSNewJMjfMiRSouIho h04jz8N3Qijw== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="139683704" X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="139683704" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 04:44:29 -0700 IronPort-SDR: c/vEeGxrsuQNC0T3KSs8RtqqengVgboQq31ZoX1QjGiu11nfTufU0QoygJ5GZ5NmIbf3FEXJpv YA9ykNlCeL3g== X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="483715058" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.206.43]) ([10.213.206.43]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 04:44:28 -0700 To: wangyunjian , dev@dpdk.org Cc: hemant.agrawal@nxp.com, sachin.saxena@nxp.com, jerry.lilijun@huawei.com, xudingke@huawei.com, stable@dpdk.org References: <1589859720-16224-1-git-send-email-wangyunjian@huawei.com> From: "Burakov, Anatoly" Message-ID: <293f5660-7e9c-3e23-10df-14b6d74f9f4b@intel.com> Date: Thu, 17 Sep 2020 12:44:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <1589859720-16224-1-git-send-email-wangyunjian@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] vfio: fix check for vfio_group_fd X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 19-May-20 4:42 AM, wangyunjian wrote: > From: Yunjian Wang > > The issue is that a file descriptor at 0 is a valid one. Currently > the file not found, the return value will be set to 0. As a result, > it is impossible to distinguish between a correct descriptor and a > failed return value. Fix it to return -ENOENT instead of 0. > > Fixes: b758423bc4fe ("vfio: fix race condition with sysfs") > Fixes: ff0b67d1c868 ("vfio: DMA mappinge") > Cc: stable@dpdk.org > > Signed-off-by: Yunjian Wang > --- Reviewed-by: Anatoly Burakov -- Thanks, Anatoly