From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 1FF752946 for ; Thu, 1 Sep 2016 08:30:00 +0200 (CEST) Received: by mail-pf0-f176.google.com with SMTP id p64so27895804pfb.1 for ; Wed, 31 Aug 2016 23:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZGOwfs50nJ4UBZKuYDjDi8N8ZaV4lhCEg0Oi3svb4KU=; b=mmztn1xYUxskO0xI7K43qAM4IlZ9eNwKuOENEQbIvHcWvKl6Hcn5qeXkHpi7r3K3HE HKj4xAEkzsMXd5+O5LUrUBQ34rEiUOHrxRaaOQ0g54KHfzLKNHzRGrIX7ggc9QgGokXa m6Ht/sEpx/GjHuGh57K6VTsoyZN2gVYRsIPDL8jt0vQLlb8V2LraZUeE3tdLifvZivIG 3sfYE3f1JmiA/jR8AZsD/UMl8ypDWkkdr43lbs7rs+KV5ew6xjrt+0RNIrsE35o2J5/z 8e1T/0eJvH04uC6co2OX+uAYcsdgbN7RhXOwlgEpnhgEgXX3KLip96aTy/9WmN6W1IXq pWZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZGOwfs50nJ4UBZKuYDjDi8N8ZaV4lhCEg0Oi3svb4KU=; b=SURAwzKvFzfnNFGFhcsplZYQTHtKqqnAahxyMWYsip5rauelzKFncgqxhxkBIHvFOa 6Ag5WfTWfjQ9llf0yHv7JvhscKq0lHmCwagIn4yBiNSJKiLKLWUMe+3yf+JC1qy83Nnn yoHEQHCbeQOPhO6w+2SJVJpEF9WB455gIfglSj0yFyyJ8pHf8EyuHYYjhwTHngURjcRU AbCY50oM4+Y4qsP++PZ1HCXGdQyaz0jNJv7U82WqUcBz5x/ycviAJ3hp6S9Wx20xpYeo QG/9CPOUmEpgN65KkI07caFLI3WCqDgtX5tecnjnKZdQM6zt/L7osubdaKQQsnkmsdpi DQFw== X-Gm-Message-State: AE9vXwPHwRpfhDJghhdY0axyOunSG+mzLgj6Cgg0Ys2o3OsJDyBlomngYzxI01qxrf0ZPQ== X-Received: by 10.98.201.2 with SMTP id k2mr23829146pfg.95.1472711399375; Wed, 31 Aug 2016 23:29:59 -0700 (PDT) Received: from xeon-e3 (static-50-53-69-251.bvtn.or.frontiernet.net. [50.53.69.251]) by smtp.gmail.com with ESMTPSA id j21sm4161310pfj.75.2016.08.31.23.29.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Aug 2016 23:29:59 -0700 (PDT) Date: Wed, 31 Aug 2016 23:30:10 -0700 From: Stephen Hemminger To: Shreyansh Jain Cc: , , Message-ID: <20160831233010.5d78d262@xeon-e3> In-Reply-To: <1472704915-13112-3-git-send-email-shreyansh.jain@nxp.com> References: <1472704915-13112-1-git-send-email-shreyansh.jain@nxp.com> <1472704915-13112-3-git-send-email-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/5] eal: extract function eal_parse_sysfs_valuef X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 06:30:00 -0000 On Thu, 1 Sep 2016 10:11:52 +0530 Shreyansh Jain wrote: > From: Jan Viktorin > > From: Jan Viktorin > > The eal_parse_sysfs_value function accepts a filename however, such > interface introduces race-conditions to the code. Introduce the > variant of this function that accepts an already opened file instead of > a filename. > > Signed-off-by: Jan Viktorin > Signed-off-by: Shreyansh Jain > --- You introduce new API, but don't use it in your other patches. I don't see where passing filename is racy. sysfs files only get created/destroyed when device is added/removed.