From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93E2CA0A02; Wed, 5 May 2021 17:36:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7365440143; Wed, 5 May 2021 17:36:00 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9A5F940040; Wed, 5 May 2021 17:35:57 +0200 (CEST) IronPort-SDR: tHZv7l/Jsgt5pnvjGEyLD6Zt6MJdzH154fGAY6XLsfgQk+kIdJCZw4LZYLLvoGAsJfevxN9jaW PJhr04MAIkCQ== X-IronPort-AV: E=McAfee;i="6200,9189,9975"; a="196202492" X-IronPort-AV: E=Sophos;i="5.82,275,1613462400"; d="scan'208";a="196202492" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2021 08:35:56 -0700 IronPort-SDR: VMEfrr2jMWCZOuk+hEspZ8nHHM/PtTWLAHPdOaJemsnc0unwrWVOdlqke3cxMRHaxzwxSkIi07 O0ibFgIF55ww== X-IronPort-AV: E=Sophos;i="5.82,275,1613462400"; d="scan'208";a="469006824" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.14.204]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 05 May 2021 08:35:53 -0700 Date: Wed, 5 May 2021 16:35:49 +0100 From: Bruce Richardson To: Ciara Power Cc: dev@dpdk.org, stable@dpdk.org, David Marchand Message-ID: References: <20210505152248.253496-1-ciara.power@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210505152248.253496-1-ciara.power@intel.com> Subject: Re: [dpdk-dev] [PATCH] telemetry: fix accessing callbacks list using lock X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Wed, May 05, 2021 at 03:22:48PM +0000, Ciara Power wrote: > The list_commands() function accessed the callbacks list, > but did not take the lock. This may have caused inconsistencies if > callbacks were being registered at the same time. > This is now fixed to lock before iterating the list, > and unlock afterwards. > > Fixes: f38748736eb2 ("telemetry: add default callback commands") > Cc: stable@dpdk.org > > Signed-off-by: Ciara Power > Reported-by: David Marchand > --- Acked-by: Bruce Richardson