Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp530547lqo; Fri, 10 May 2024 07:16:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnzsima5QOWOI7y7ur/gTvgmUSX5ST8G7EMTwGRoW4xdjOyszfqFgbsTW0IaCZGMkUYt1pFgIHwMBBPKAEd9XhSVyC4A/InJf06Oxnmg== X-Google-Smtp-Source: AGHT+IGAcMtxs/y7mC3N14cm7vprQnoupRzRdC/UY9WH2G7Bp5BSGs76umjstVEtBNVbbMVUgBAA X-Received: by 2002:a50:cd47:0:b0:572:2efe:4d14 with SMTP id 4fb4d7f45d1cf-5734d5ee4a9mr2392986a12.10.1715350565483; Fri, 10 May 2024 07:16:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715350565; cv=pass; d=google.com; s=arc-20160816; b=SNxtSg87ZposCTUXqnKOTbLPOX7ze0cpgO6iMzx6UEXJH+/04xBXh4v1xJ9hzEc1qZ VQJwGUohKLVdgBc7IVeGK//TH640mNMNgQyqlGK8c0kdkpncJhQ9W9CRC4Gcsm5LDjhd rxUs2lytL9ZRrd/B3LYlp3MGvSDQjWdW6h6EAHULYQCl766aZ+9v+fCnd1Wg4aJj3Em/ iFI1l58FIX3y4u9xR8Pg22PMGiAdAO28o6HwTx9hFU5a/shnBIDns2dCuO4Q1dKJpKlk tjufCH3oadAk+IDcolTZhI8PuomY1/TM+JLnvoXEiA837j+v8OJWq8VK7gXTWBlb7B71 dz/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lBngR5iRvzboGglhYJ4lblH2sT1tuGU2InLrZ9JPWkA=; fh=hz0W1u2qsfBnLqXVrprYSQ//BpzJ5BZDVX8LhWJB4Go=; b=L7WANf7IYFie/NvXzAA9Pu1E/oVDdUooP4mV59BE5XHMMv4lD7YaPWobsD6vvDf6A7 DTtswFX7gLu9XimRPFnaebsuvllMQyB7GYOBaD7KNlhXjmqlmKu7il6s4LhIpb/bTJJ5 vESHSFbdFuXo0jPiz0W+tIznTq+oCziYgifIM/yhFTn4fdFurSpZCY0Iq934MngZj2t6 EXbVkk8NbXxlsEmEUdS7+Edaykj1gTj5x0Pj4vPLSzCwKmziD2WniU0GSBiG4HbrhHJX HZ3O7SMlhGs1TlbMjEHvW2qn5cTQ/0yEgZsWckaKXQFptS1hLnvfkxaEhq6ZTWVesVed B1WQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XivSKhIK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175875-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3287d4si2028138a12.418.2024.05.10.07.16.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:16:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XivSKhIK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175875-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 395E11F20F90 for ; Fri, 10 May 2024 14:16:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CD7B161330; Fri, 10 May 2024 14:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XivSKhIK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E6A212DD93; Fri, 10 May 2024 14:15:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350554; cv=none; b=Y942Gzi++vAixKo9V3VWmRN17QBKVds152WqfaOMdBjs9vhslJPClBzPskRH9Dmccp3BPJ1ek6l9nWBO1+XqakGZh3eDoA55wcFvIb5VGYUSDBb2USm/4eBhaOC4piHYVI2TsEUNSPvnW2VrNovh01qV2NmeY0g36HRB14tM7YU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350554; c=relaxed/simple; bh=Bc4hqX/m0AxXcyrSLTvBIXURaXcSvRXC3i+DpTHFxp8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W6Kk7NMj6qiiJi6aClW14+0lUVJaWTZAnD5TNJ+WtRwOSjwfqSDq9nd5wsnex6b9lC4f3Y0ZShCi8aAO6bHdWNDMYlGzfMNafX7QTzXWqgVjJaVdxK9vIfi2Qd/exQXdxL8chhyCn22yPIPS4kMblT+3d89lNLIWbx0HDBfi8AY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XivSKhIK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74941C113CC; Fri, 10 May 2024 14:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715350554; bh=Bc4hqX/m0AxXcyrSLTvBIXURaXcSvRXC3i+DpTHFxp8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XivSKhIKugkr7R5Zh91B9wvodhthFrMK9ea4i4A5Uga5fez7nr3SGEBMOk+vOPtI4 sjPkpOAuwLvLixvpGTF1ZgmPkGHO0v5RqZghZK6OdSmiKIuBa8joxze81j3JvosjMf yJtj8sTvCbnZHzOSQeLRqc87a1HGu6JrDaetC9dvWc33c23aln9lhd32XP+/pBJSj4 j7TQOE97KS09A5YcahpFahx/a+36NBMcgJ2zsJDEySV+fNvWOeGn+hwCrOmoSzMjFq 5FfTaKU+cYWT1UPzVcT8mZqrtJpnsw1cvYKAX51eljq6PvgRTZs3UC2z/SOqMcyMj8 +Pye0FFFwvfBg== Date: Fri, 10 May 2024 11:15:50 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , zhaimingbing , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] perf lock: Avoid memory leaks from strdup Message-ID: References: <20240509053123.1918093-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, May 09, 2024 at 11:24:10AM -0700, Namhyung Kim wrote: > On Wed, May 8, 2024 at 10:31 PM Ian Rogers wrote: > > > > Leak sanitizer complains about the strdup-ed arguments not being freed > > and given cmd_record doesn't modify the given strings, remove the > > strdups. > > > > Original discussion in this patch: > > https://lore.kernel.org/lkml/20240430184156.1824083-1-irogers@google.com/ > > > > Suggested-by: Namhyung Kim > > Signed-off-by: Ian Rogers > > Acked-by: Namhyung Kim Thanks, applied to perf-tools-next, - Arnaldo