From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0B480A05D3 for ; Fri, 29 Mar 2019 11:43:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 087E73977; Fri, 29 Mar 2019 11:43:00 +0100 (CET) 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2019 03:42:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,284,1549958400"; d="scan'208";a="156919801" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.103]) ([10.237.220.103]) by fmsmga004.fm.intel.com with ESMTP; 29 Mar 2019 03:42:55 -0700 To: Darek Stojaczyk , dev@dpdk.org Cc: james.r.harris@intel.com, changpeng.liu@intel.com, gavin.hu@arm.com, thomas@monjalon.net References: <20190329050951.153202-1-dariusz.stojaczyk@intel.com> <20190329095239.9646-1-dariusz.stojaczyk@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Fri, 29 Mar 2019 10:42:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: <20190329095239.9646-1-dariusz.stojaczyk@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] fbarray: fix attach deadlock X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190329104255.RmQzee_yTq_WsxvWT1J1oslno2uv2Ry-Qp4_rf1uBHY@z> 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