Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3631778imu; Mon, 28 Jan 2019 08:08:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7zoeC0z76+NWWxDEZJL9qfY8j7FGC+H2EsGl7HcqCXtm2og0H1LFynJQ+Feq+uuZWs/ST9 X-Received: by 2002:a63:4e15:: with SMTP id c21mr20402191pgb.50.1548691727843; Mon, 28 Jan 2019 08:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691727; cv=none; d=google.com; s=arc-20160816; b=aLXSWd5JfRc3cZrZ44dhQmpls/tIGeDrt9+zF0yhQ0t0UxCwzIG2ANrp4BdwloclX/ HvKMqcPTvCXbmYLZvbEWRfLwt5Qf6iUVCx3gsJUXZBeweCqokMkyUx4TfDQUGncMRi+4 bvxS5c4e4ZHB703xlxsAEIblCnt9m/f5Wys2SHwUL3TzQsWoq+xwMAVuHRXrTbcYJfqD 4neq5UTqbiceX+uw2ZxHbLkf6dAl9cxuA+hPSzDD22vkfSxQbOdCCUPt+s/1xg2u8RSJ 8AebnH4euoaqr6UYdBNcflqdS9qWaems1zdfjwvQmf3WMWmCEPlKXfg3qQ7rXcHbxsKs 1Rlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cvEEPIShZCPackJ1u3vdYlb/ijSJxE9w2P2SDXJ1V1c=; b=odqkYbMeVuj6GxnTQocOnF6Dqb/pDL57eDOH9KwDgC2KsByCMtVb1ljJmJRPHK3lD7 Uw5/cRjqij+vsBFRTuzsBIO+D8Ze1hpnwnKLAPEbkSUb52KCKTQfjfVz3Bdpgl5/DtWQ 20zd+LguVsL4Xue8oSmBignK/E9cwbUg0gmATq1atOcjmTdKkhnAKWFjFX/bONuIOrdS kEbg8Nug/Ry+nW+KRjBbaxw7KTCe52RuJRaopcvQ9EqN3SPTmZI/GHJhqAhpoFv1EfGY KbQ7DJCAhdM6/ycv4vuuJz5sYBpGmpcuyHyWmpoluOClDcBbDtPqclqM5xNLnEsOhebm nc4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="frp1hY/M"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si32569660pgm.250.2019.01.28.08.08.32; Mon, 28 Jan 2019 08:08:47 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b="frp1hY/M"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732225AbfA1QHd (ORCPT + 99 others); Mon, 28 Jan 2019 11:07:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:58246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732212AbfA1QHa (ORCPT ); Mon, 28 Jan 2019 11:07:30 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 758792147A; Mon, 28 Jan 2019 16:07:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691650; bh=f2bfUr/EtzNT43pnnLIalrWvmm4G99uDBUZcdRjpS2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=frp1hY/MZBNJbjKLY4RfC5gVH1SFUpvrDiFNeExyKnJXc7U93+5Wx464g7WELqPDM K4S8BWgGQU4lO/maIovRPnWlZQ3lr0ir+x7bO2p3TNvr6VdWGCGU8VfozvJlZ4EFWi DReLRW4icE2EbN3CPrUN6icOFKoweCrLIPPOHS4U= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Doug Smythies , Doug Smythies , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 173/258] tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file Date: Mon, 28 Jan 2019 10:57:59 -0500 Message-Id: <20190128155924.51521-173-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Doug Smythies [ Upstream commit 663546903c835fe46308b1b1e53d32d1f2b33da9 ] This script is supposed to be allowed to run with regular user privileges if a previously captured trace is being post processed. Commit fbe313884d7d (tools/power/x86/intel_pstate_tracer: Free the trace buffer memory) introduced a bug that breaks that option. Commit 35459105deb2 (tools/power/x86/intel_pstate_tracer: Add optional setting of trace buffer memory allocation) moved the code but kept the bug. This patch fixes the issue. Fixes: 35459105deb2 (tools/power/x86/intel_pstate_tracer: Add optional ...) Signed-off-by: Doug Smythies Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py index 84e2b648e622..2fa3c5757bcb 100755 --- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py +++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py @@ -585,9 +585,9 @@ current_max_cpu = 0 read_trace_data(filename) -clear_trace_file() -# Free the memory if interval: + clear_trace_file() + # Free the memory free_trace_buffer() if graph_data_present == False: -- 2.19.1