Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1744047ybn; Thu, 26 Sep 2019 01:20:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYFFwf4vPB7mtjRJatV+/NoNZdumXpH5k8q2y9rluh2ojawNtm1u3ID70Xs3Wv2BkGN9wc X-Received: by 2002:a50:d0d5:: with SMTP id g21mr2245521edf.204.1569486002748; Thu, 26 Sep 2019 01:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569486002; cv=none; d=google.com; s=arc-20160816; b=iv3htAp395pGBrnGLwusydmqSwrjrS8XcJja2COkCFSUKIkmBQw/mDklnsXGbwGs94 YBgBTPkNRVu16vlkcLdZIMlm8Qfz8htdu8RS+7Gu/+mupBYbbt0bFQ3PH1s9DkZSb1ub SRECb+LVeTmLv/KG2I3FeV6l7HTSrmtX1ncKuWN0h/gbrX3L0TPi/TQZgZCZaJ1wMBN2 bwY0HIolOBI71F+ZyTbMhEDW/LaJ33oHlrrfcntKU+EPBRRyP2xpO8x05tbMB+TdMi27 kP04g02ZS1HQYQaG/DyFq1uaUOOTGBLaWvZ0Vozr7iNS1xYkKqf1mLoiJFmAE4dCjtai sYRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Tg68w8/ZMKcV4YGJ1Uex41DGB6VFA7wp6nK6J+kuAe4=; b=OJQjgItUb7HcTJoSO+/7c7xDoTGeIAAfBEF+1UhII82OquO74bRyit7po1xcey/XXJ fzzCjtWSEOIy5XE+yBgZ7HZcLk4Hdm0SAnX6EVx8mHdf/9frldWX7SzDI3vIw/iC3Qn7 0HbfLaP1oO1PuuN/wFaX+j4B39R6kAPBHOYxJK+OAg49kAge78wckP15PmYTddRlaS5e LK0r4l6rOo/NvXFLzidX1R18LTaM1XT1Y/QWLBJh+mAJWtUVLhJrqD5mIkPs7kN10K7z XhP7WmbFR83bZbQjR5w5i4xgVOymfDtdJHB0xWAQkEiScKUlxLYHc4vQu7i56tzrEc2E xVUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si778398edq.60.2019.09.26.01.19.38; Thu, 26 Sep 2019 01:20:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438454AbfIXQFq (ORCPT + 99 others); Tue, 24 Sep 2019 12:05:46 -0400 Received: from mga04.intel.com ([192.55.52.120]:16778 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391013AbfIXQFq (ORCPT ); Tue, 24 Sep 2019 12:05:46 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 09:05:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,544,1559545200"; d="scan'208";a="340126790" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga004.jf.intel.com with ESMTP; 24 Sep 2019 09:05:45 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 07164301AF5; Tue, 24 Sep 2019 09:05:45 -0700 (PDT) Date: Tue, 24 Sep 2019 09:05:44 -0700 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] perf, evlist: Fix access of freed id arrays Message-ID: <20190924160544.GR8537@tassilo.jf.intel.com> References: <20190923233339.25326-1-andi@firstfloor.org> <20190924074401.GA26797@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190924074401.GA26797@krava> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > id/sample_id arrays are not created when evsel is open but > we free it at close > > for now this fix seems correct to me.. we are moving id/sample_id > arrays under libperf, I'll make a note to check on close and reopen > of evsel and add some tests for that > > Acked-by: Jiri Olsa It looks like there are still some bogus closes in such a case, at least valgrind complains about some close(-1). But these should be harmless, so I guess we can leave them for now. -Andi