From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 0/4] fix creation of duplicate lpm and hash Date: Wed, 06 Apr 2016 17:31:56 +0200 Message-ID: <2006370.AW7BpQLGPu@xps13> References: <1459857229-9814-1-git-send-email-olivier.matz@6wind.com> <1459949281-26562-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com To: Olivier Matz Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id E41082BFA for ; Wed, 6 Apr 2016 17:33:34 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id l6so70609050wml.1 for ; Wed, 06 Apr 2016 08:33:34 -0700 (PDT) In-Reply-To: <1459949281-26562-1-git-send-email-olivier.matz@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-04-06 15:27, Olivier Matz: > Seen while trying to fix the func_reentrancy autotest. The > series addresses several issues: > > 1/ Hash and lpm return a pointer to an existing object if the user requests the > creation with an already existing name. This look dangerous: when an object > is returned, the user does not know if it should be freed or not. > > 2/ There is a race condition in cuckoo_hash as the lock is not held in > rte_hash_create(). We could find some cases where NULL is returned when the > object already exists (ex: when rte_ring_create() fails). > > 3/ There is a race condition func_reentrancy that can fail even if the tested > API behaves correctly. Applied, thanks