From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v2] fbarray: fix attach deadlock Date: Fri, 29 Mar 2019 10:42:55 +0000 Message-ID: References: <20190329050951.153202-1-dariusz.stojaczyk@intel.com> <20190329095239.9646-1-dariusz.stojaczyk@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: james.r.harris@intel.com, changpeng.liu@intel.com, gavin.hu@arm.com, thomas@monjalon.net To: Darek Stojaczyk , dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 6CF8F343C for ; Fri, 29 Mar 2019 11:42:58 +0100 (CET) In-Reply-To: <20190329095239.9646-1-dariusz.stojaczyk@intel.com> Content-Language: en-US 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 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 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). -- Thanks, Anatoly