Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp668429pxv; Thu, 15 Jul 2021 13:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAeBPcee6CZL0lkDMlseAc64w1YaNNi0NetT4jQRq03j+g+/aeXzrAC51HrJlhFJi4G9/g X-Received: by 2002:a17:906:b094:: with SMTP id x20mr7241995ejy.257.1626379217649; Thu, 15 Jul 2021 13:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626379217; cv=none; d=google.com; s=arc-20160816; b=uzdpG+1/EULU4DMNuVM2dEToDJb9qyqjGkQ6qHfiaUZ/1A1joGg1fsnrIrP/Nhgatj o5Dvs472mbFK64Fu/PL0c0m4T+VnRcT4sdlPVrD+ugLc3Yn2AgFPzDWKlIjj7Wd/Id7W QwgyD5HGd5QLiPAFdfucYaafgXypLIModjtyPAiacseR9Ebcv8Pl4LQLVaSoQOr5XRAR UxFVAt09+SMX9WGghjrfWJPjt8f7G15whTyVZw8i9w8X6zkPYQ2TcJ1KMBysaG9PxuOG xwyznDSLQ1SRQ6irVO83j2jWm/tCwuHx/Thh0gblJD4ekRGXp5ziGcLBD6Mn7yZq71aZ JnwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e7TJPSUFhgDUFS0eaCahV84mokW3H2ewCSsnY9vfRBE=; b=z6sosdz9s4Q9Xa8/7GFZkg89qYbX0iJwpVKhcgI/sRGefQHb0Y/r1Y27S8QVMSobCa OyvHEsEdZ6u2C2MPkhMnQMGbpzjaugTCdMCOR4z/1u2P/woU88Q6aqmTGUveB6VH3ePe h3DzcznOOM4hw2jDMqJPegw0yV0rXZ8mfyR0TzWaODOlfeNPfRTpJsvCKkG0csVi2Ige NYQqBycaV0cFrg1cB2nzL4pc19sK5zeYnhi+sRaelt+6WCDHv2LnM4LDDMGT3Ua1cFoU pYRLxilAtTnuod5GfO2WemlHLJHxb0cZnzyjCQWKAazDRqAwpSJNL3cABOcYzbZT26xG lt/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BXD7yHsy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si8743086ejs.735.2021.07.15.12.59.53; Thu, 15 Jul 2021 13:00:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BXD7yHsy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244951AbhGOUBn (ORCPT + 99 others); Thu, 15 Jul 2021 16:01:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:47006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345027AbhGOT5D (ORCPT ); Thu, 15 Jul 2021 15:57:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 68B95613DA; Thu, 15 Jul 2021 19:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626378848; bh=b/cM3lLGocyFqH187slOjN0KGM0gpqViLiQYCWp1ApI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BXD7yHsy7w/D8omyhmAVccFSgutn3bQ5jP8T4Lh35P6Z/BlKI3u+xEUGhl0fyXcDX fvP3IKc8zHmcvFq6MBeb38w2NiZw+bCv0VeKjCtic0i54t+qVQwIVBipuFZmbUuTqH lehn//fSJEnrLP8VTmPYJ/u4vTXn6rNthrraY6tKF6x9lwI5DxTJ+AecK/mlP3XVrI DwFjj9TxZFSdJlJUVXglSEE6Gpdxu3hrqUx+NdMSca6nzma0dZk15oaB/j8/euKmbb 8x2pwqnc7S/IEVhz5RxNvCeox9W7guaiLZKXulWasfjRSnYpZ/g5v20cu0gLxIZRIa Se1xHXcocPrOw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id ABA82403F2; Thu, 15 Jul 2021 16:54:05 -0300 (-03) Date: Thu, 15 Jul 2021 16:54:05 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 04/20] perf test: event_update: fix memory leak of evlist Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 15, 2021 at 06:07:09PM +0200, Riccardo Mancini escreveu: > ASan reports a memory leak when running the perf test > "49: Synthesize attr update" caused by evlist not being deleted. > > This patch adds the missing evlist__delete and removes the > perf_cpu_map__put since it's already being deleted by evlist__delete. Thanks, applied. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/tests/event_update.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c > index 656218179222cc58..932ab0740d11ced6 100644 > --- a/tools/perf/tests/event_update.c > +++ b/tools/perf/tests/event_update.c > @@ -118,6 +118,6 @@ int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unu > TEST_ASSERT_VAL("failed to synthesize attr update cpus", > !perf_event__synthesize_event_update_cpus(&tmp.tool, evsel, process_event_cpus)); > > - perf_cpu_map__put(evsel->core.own_cpus); > + evlist__delete(evlist); > return 0; > } > -- > 2.31.1 > -- - Arnaldo