From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v2 07/11] ethdev: add lock to port allocation check Date: Thu, 10 May 2018 13:44:12 +0300 Message-ID: References: <20180509094337.26112-1-thomas@monjalon.net> <20180509224313.27289-1-thomas@monjalon.net> <20180509224313.27289-8-thomas@monjalon.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: Matan Azrad To: Thomas Monjalon , Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 874B51BA6E for ; Thu, 10 May 2018 12:44:21 +0200 (CEST) In-Reply-To: <20180509224313.27289-8-thomas@monjalon.net> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 05/10/2018 01:43 AM, Thomas Monjalon wrote: > From: Matan Azrad > > When comparing the port name, there can be a race condition with > a thread allocating a new port and writing the name at the same time. > It can lead to match with a partial name by error. > > The check of the port is now considered as a critical section > protected with locks. > > This fix will be even more required for multi-process when the > port availability will rely only on the name, in a following patch. > > Fixes: 84934303a17c ("ethdev: synchronize port allocation") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad > Acked-by: Thomas Monjalon Reviewed-by: Andrew Rybchenko