From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] fbarray: fix attach deadlock Date: Fri, 29 Mar 2019 12:15:44 +0100 Message-ID: <3325026.qBvnxJ56JQ@xps> References: <20190329050951.153202-1-dariusz.stojaczyk@intel.com> <20190329095239.9646-1-dariusz.stojaczyk@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Burakov, Anatoly" , james.r.harris@intel.com, changpeng.liu@intel.com, gavin.hu@arm.com To: Darek Stojaczyk Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 123E42965 for ; Fri, 29 Mar 2019 12:15:48 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 29/03/2019 11:42, Burakov, Anatoly: > On 29-Mar-19 9:52 AM, Darek Stojaczyk wrote: > > rte_fbarray_attach() currently locks its internal > > spinlock, but never releases it. Secondary processes > > won't even start if there is more than one fbarray > > to be attached to - the second rte_fbarray_attach() > > would be just stuck. > > > > Fix it by releasing the lock at the end of > > rte_fbarray_attach(). I believe this was the original > > intention. > > > > Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas") > > Cc: anatoly.burakov@intel.com > > Cc: thomas@monjalon.net > > > > Signed-off-by: Darek Stojaczyk > > Reviewed-by: Gavin Hu > > --- > > v2: > > - fixed one more case where we could unlock the spinlock > > before locking it > > Thanks for catching this! > > Acked-by: Anatoly Burakov Applied, thanks > There is one more case where we do unlock on init without locking, i'll > submit a patch separately (and will check other functions with a > microscope just in case). We'll take this one too.