Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp797449pxj; Thu, 3 Jun 2021 21:11:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5+Xfi/4gcDuPsQer+eknfpovQ7J5HYyeBMz95LeiWMLaVmhqXbthvx62JeQeVHFsiNC2L X-Received: by 2002:a17:906:3da9:: with SMTP id y9mr2272753ejh.303.1622779887129; Thu, 03 Jun 2021 21:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622779887; cv=none; d=google.com; s=arc-20160816; b=VZmD8E4cwZsTn244KbeccNOT7hgPeHdSOf6w/XJ8CdLOFjGcGgD4Wq+7L0P/dDaJcJ CjovEhAqtd4VQXDIbdLzt+lJiT8ZpGtOsJ/ooSWRNF46ggk3n/YBEaZS7L+JWMUwTXaw kHi7Qt8rEh0blI47NUrMCrTLusUbV46IWkw9ks4hFihgymhzJXAOVtviVR/ewn+n5Qyk 6xtTWXIDuhjBzymunRpOG9CH88Clvug22zmhEg2JqsHAa1PBFg/NuyYzdbtkYn2spwP9 ekrfOB7BNfFJMaw+67N+N4W8kEEXKY6OM4/sJhA+SNMEm/e+w2gi/+yJ4GrlL89Y/7Zx ui6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rfFWh4ehMvZvarUEM/OEH+HgEJn9h9iDxFF2ooCD8dA=; b=rzEnOd6Gp0v3l+gg4JQx0cG+YMm94lXgmioQd2BJMLVgvnDStw93QD5iZxz8wSDxfh gnz4l3p/2KNCmQu1rhDMSkdrE0CVEUZ2X0PmapgLt9ASYeaWFU4omcFjy8he8lsK6CXK EKN284i2SFr/sc90V825CEYVRApJKPZap7KJYaFptMZOOQhcwodZeBNGgwOyO8zO/c5P f+YPvHhc5tkmKuwMjj6u7cDac13Vi4f7p/dArYl8hC8AwMxfhorfQIZJ3zlR2MUD+iip Esas9Ox56WVjXod5QZhGzUEIZxyo4ASm0BKU+lCB4rEAVLE9Mi4LDM8tbgB8O9i0eKCh 7XVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=izbJ97c5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si3660421ejn.615.2021.06.03.21.11.03; Thu, 03 Jun 2021 21:11:27 -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=@google.com header.s=20161025 header.b=izbJ97c5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbhFDELD (ORCPT + 99 others); Fri, 4 Jun 2021 00:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhFDELD (ORCPT ); Fri, 4 Jun 2021 00:11:03 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56E2BC061760 for ; Thu, 3 Jun 2021 21:09:01 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id l2so7876863wrw.6 for ; Thu, 03 Jun 2021 21:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rfFWh4ehMvZvarUEM/OEH+HgEJn9h9iDxFF2ooCD8dA=; b=izbJ97c5bA5kiAg0OyxG8z7Op1DZWsH9lOrD0hv8MC+iEa29K9rV1k21a4TSFqGSRN DLp/z/A9fClS7OxJXegKLroGrPgZTFNmtcLlGk6Vnw6BlxC9ZunDPDYFqUbLo7KVNuiw OLGzKA7WR6Hihl44JJSKOIT49fcKaXWLwM9TBWSI8Z/8JlbuWHczr8lrMawrYzIV81iV yGl5gGUmFh+nwFtLbgmevWlj6xierVLPmgVGzB6RE5hcgJ3pE59hxAkUV8BUvKQXAcxB 3K2GXHwiy7HxYdLm757RyIYVhC/kDvv2TdWWQd836RbugR6VDfHXf6/tBU2PAA9NV+Pp r3Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rfFWh4ehMvZvarUEM/OEH+HgEJn9h9iDxFF2ooCD8dA=; b=a6rSIUDX7kW5dBdU69/gZcpmiFTQPmiynDw0QOT/s3joKT1dU9R/VXm2uLdnS/OLds uXH/GWfayYNVgILfqpcEdVbnC+ciwWnNY76kBjR2hO3mqVQIvHhaXvzQp33mrDYCynQh dK0yoykHf1Y7T1eC0Oak5twj6Og49oJOxaQv5WUvrTEy1nwCbcwi1GmmVJLsIpaziQwE 46DrI1jAoWWiWTYfTKbzd/SowxYJCyzKFJY8EXiHUtmBqPJjgh2IIQbk3OX14cHFLL/N DPZ00ID51BTuoXw7BcGZ5qeaZYh6niW3OXKKCGBeRzWVNrurDHfSCjOpxgZB1rClrQ4R yd6w== X-Gm-Message-State: AOAM532XRkgXmPZgnFbEs94dakjKeYdgbt9MKH4Qtv9p3fOvylt5wz45 7ss2VtGn6gSWoZZozr1GnkFoe2DrUmVkFp0u+ZKPzQ== X-Received: by 2002:a5d:4903:: with SMTP id x3mr1481395wrq.376.1622779739764; Thu, 03 Jun 2021 21:08:59 -0700 (PDT) MIME-Version: 1.0 References: <20210602220833.285226-1-rickyman7@gmail.com> In-Reply-To: <20210602220833.285226-1-rickyman7@gmail.com> From: Ian Rogers Date: Thu, 3 Jun 2021 21:08:46 -0700 Message-ID: Subject: Re: [PATCH] perf symbol-elf: fix memory leak: free sdt_note.args To: Riccardo Mancini Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Fabian Hemmer , Remi Bernon , Jiri Slaby , linux-perf-users , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 2, 2021 at 3:12 PM Riccardo Mancini wrote: > > Reported by ASan. Did you have a reproducer for getting this to fail? > Signed-off-by: Riccardo Mancini Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/util/symbol-elf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c > index 4c56aa8374344..a73345730ba90 100644 > --- a/tools/perf/util/symbol-elf.c > +++ b/tools/perf/util/symbol-elf.c > @@ -2412,6 +2412,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes) > > list_for_each_entry_safe(pos, tmp, sdt_notes, note_list) { > list_del_init(&pos->note_list); > + zfree(&pos->args); > zfree(&pos->name); > zfree(&pos->provider); > free(pos); > -- > 2.31.1 >