From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: protect malloc stats with lock Date: Fri, 12 Jan 2018 15:42:19 +0100 Message-ID: <2424466.Pz8JVrVW5I@xps> References: <39635342ba1c29bc96bee904e6b888b058f0a5ca.1513865781.git.anatoly.burakov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, stable@dpdk.org To: Anatoly Burakov Return-path: In-Reply-To: <39635342ba1c29bc96bee904e6b888b058f0a5ca.1513865781.git.anatoly.burakov@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 21/12/2017 18:32, Anatoly Burakov: > When we're gathering statistics, we are traversing the freelist, > which may change under our feet in multithreaded scenario. This > is verified by occasional segfaults when running malloc autotest > on a machine with big amount of cores. > > This patch protects malloc heap stats call with a lock. It changes > its definition in the process due to locking invalidating the > const-ness, but this isn't a public API, so that's OK. > > Cc: stable@dpdk.org > Signed-off-by: Anatoly Burakov Applied, thanks