From patchwork Fri Apr 13 15:58:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Burakov X-Patchwork-Id: 38061 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B9B051C6AB; Fri, 13 Apr 2018 17:58:44 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 67E5F1C6A6 for ; Fri, 13 Apr 2018 17:58:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2018 08:58:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,446,1517904000"; d="scan'208";a="46703847" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 13 Apr 2018 08:58:41 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w3DFwekg000772; Fri, 13 Apr 2018 16:58:40 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w3DFweai025475; Fri, 13 Apr 2018 16:58:40 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w3DFweaQ025470; Fri, 13 Apr 2018 16:58:40 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: anatoly.burakov@intel.com Date: Fri, 13 Apr 2018 16:58:39 +0100 Message-Id: <9d5e4a60da6c550be1d0b695b170279d51ed38e1.1523635100.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] malloc: fix not unlocking hotplug on fail to init 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" We lock the hotplug during init, but do not unlock it if we couldn't register multiprocess callbacks. Add the missing unlock. Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug") Cc: anatoly.burakov@intel.com Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/malloc_heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c index 41c14a8..590e9e3 100644 --- a/lib/librte_eal/common/malloc_heap.c +++ b/lib/librte_eal/common/malloc_heap.c @@ -815,6 +815,7 @@ rte_eal_malloc_heap_init(void) if (register_mp_requests()) { RTE_LOG(ERR, EAL, "Couldn't register malloc multiprocess actions\n"); + rte_rwlock_read_unlock(&mcfg->memory_hotplug_lock); return -1; }