Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3379365pxk; Mon, 28 Sep 2020 16:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQm9yrCVRm/zLsiF17UmRp2VzGI1YWRqyycxzfv9yTQesWQ7loEPflhPSCYl0FezOPmkAQ X-Received: by 2002:a17:906:5509:: with SMTP id r9mr1143517ejp.12.1601335370681; Mon, 28 Sep 2020 16:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601335370; cv=none; d=google.com; s=arc-20160816; b=SpDwsRF0ZhOUpnOy1nqo5op60fUIHMZe95ZWSyw5DWfrfvZP3sVYQuijiDPf7oBuKH 0M6NW99slOp6ignU2tUn+mBzMJZoAvO1YO5x8s2eDALMaxGCVueJ5I9g/DwDdDU71yA9 /lUClcvhys3P3R1V+Rb6Hvhmg0Fx7VGHRU5QsFGnP6um62ZNhsxK/TvHhAOD7IqRWRYF bPmy+xxWAkliL8WDQIpJdjRQYbOImyFF3GNrH+ctavy6W9uSRpiuo4AUsDb2zBqmwVF+ RW5XaqSv83DqzHm2Fr1lNhkXSWMr5eyf7uzwH9lWkn6/fKGaUOWkuHjdTo5eFRYsYF9y NGRA== 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=zYrDdS2KsWH6a1Yi8I0MyKSMCfr/He4QJnzpxexf1ks=; b=SAB9F3/8bAYw5YsSZ7vQD1P2o4F/t/Ey3CGPjAEn68OOiimhq0UglJFqPrPhPyMsch JdHw/JeqQcYPZdbSQl3rdKzgrQEhQrXiFp1xsamBuL5RJf/+pDBG0GnRd/weIRIFii6O 3iWT1ikhu6Lw1O7ivTPy34SX7tnW9BrRHVZ4kuta/7rJZFIe9KSokunhYkfWY3U4G/g1 mjOe1NnOQSabWp7fXYGV1J7JpDlJChx+6/Nc2IrwkQCti1uigiRw7uQA/Tvrb7YTRrVy x4z1RURaKXJe1LlRei0zq6K6hLAeq74zQaDRJJ9Nt9NP19etb0z1ok2JPQfPbB6TSnHd 2dlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=10JFGv45; 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 o11si1513512ejr.667.2020.09.28.16.22.22; Mon, 28 Sep 2020 16:22:50 -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=default header.b=10JFGv45; 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 S1727072AbgI1XUc (ORCPT + 99 others); Mon, 28 Sep 2020 19:20:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:42848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726379AbgI1XUc (ORCPT ); Mon, 28 Sep 2020 19:20:32 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F62721D7F; Mon, 28 Sep 2020 22:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601330488; bh=MZv602zAH+mldtKaHV8n2x/vl5hO6z6CgNiDtNb/co4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=10JFGv45YDJTrlFEV6WQiTAi/TskPMzQj6c6xbeq9coOe6pfxGYK0il/SvxLwNFVy ilsp7OakST5z753hMgoeauIJjW/hdokg8folEDFOfyRy6IK6iooE4J7OMx5EhT2IH7 vAD/K7NxbXL/8L1GL3xPWfzt2zHTf9nv6NuiV0QU= Date: Mon, 28 Sep 2020 18:01:27 -0400 From: Sasha Levin To: Naresh Kamboju Cc: linux- stable , Arnaldo Carvalho de Melo , open list , Ian Rogers , Adrian Hunter , Alexander Shishkin , Andi Kleen , clang-built-linux@googlegroups.com, Jiri Olsa , Leo Yan , Mark Rutland , Namhyung Kim , Peter Zijlstra , Stephane Eranian , lkft-triage@lists.linaro.org Subject: Re: [PATCH AUTOSEL 4.14 112/127] perf parse-events: Fix incorrect conversion of 'if () free()' to 'zfree()' Message-ID: <20200928220127.GE2219727@sasha-vm> References: <20200918021220.2066485-1-sashal@kernel.org> <20200918021220.2066485-112-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 01:24:32AM +0530, Naresh Kamboju wrote: >On Fri, 18 Sep 2020 at 08:00, Sasha Levin wrote: >> >> From: Arnaldo Carvalho de Melo >> >> [ Upstream commit 7fcdccd4237724931d9773d1e3039bfe053a6f52 ] >> >> When applying a patch by Ian I incorrectly converted to zfree() an >> expression that involved testing some other struct member, not the one >> being freed, which lead to bugs reproduceable by: >> >> $ perf stat -e i/bs,tsc,L2/o sleep 1 >> WARNING: multiple event parsing errors >> Segmentation fault (core dumped) >> $ >> >> Fix it by restoring the test for pos->free_str before freeing >> pos->val.str, but continue using zfree(&pos->val.str) to set that member >> to NULL after freeing it. >> >> Reported-by: Ian Rogers >> Fixes: e8dfb81838b1 ("perf parse-events: Fix memory leaks found on parse_events") >> Cc: Adrian Hunter >> Cc: Alexander Shishkin >> Cc: Andi Kleen >> Cc: clang-built-linux@googlegroups.com >> Cc: Jiri Olsa >> Cc: Leo Yan >> Cc: Mark Rutland >> Cc: Namhyung Kim >> Cc: Peter Zijlstra >> Cc: Stephane Eranian >> Signed-off-by: Arnaldo Carvalho de Melo >> Signed-off-by: Sasha Levin > >stable rc 4.14 perf build broken. Dropped, thanks! -- Thanks, Sasha