Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2653713imj; Mon, 11 Feb 2019 06:31:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IbxmH8C75JnwdfPuVW4iGUE9YXwHqN7G7piaY50+RUVSDzrO0m76BUgw8CKoq4bpxUo7z/V X-Received: by 2002:a63:5109:: with SMTP id f9mr12041844pgb.450.1549895492617; Mon, 11 Feb 2019 06:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895492; cv=none; d=google.com; s=arc-20160816; b=SwhrQDoG9xqYiV+EMaZsO4yqWKtqLPdV8TxNxMfeCgA/Oe/78CQSEduTA5N3SExJLS PB3p2gEaAa7YJ1l2USFsX4zOwfGuZLxIPcqz7taEuQZVGY+5Hj6ZfcWxrmxqWbXvp6IJ flf30SIcgS+BuMq5ZIIR3v7Qkl4rTTrTFeJpUa2dRgKSHXBmkFLRFrisFEmqegLqt24m J3SRWByUTAUxrZOHdwBrrOAtJzr2nVPQzMC1dymKsFbd7N5SFancUbfIG0W0bVPZWiqd oUCIOhv3SuzgO5esm8rZ6rGGij/npSzOio2k9TKFxa6EHz8QIYibDPgbtdNTJJBocZES 2uvg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U2jtdo4/bRpd+4qFqGhPgLYJcuDY76+XZ3ba2dLo2x0=; b=uTWElxDT//aixWdlBks6yDqfCrlTWPeioc6cV0HdXbVSorvVyvsIiJTnA89YYOtSq9 IwbAy0ip0KS111gO4zCO36Z66nZa9h3D5TWPiOTTv/eR+pHvaCAPP4lX0KhX3XuH9Yij y8ZJIH/RIqFOXD+J8YIAgbfAcOCaXg6dlycgW2GK5goHaOTYTFMOgnGFfGOM4Y6UkDm7 v18HZ4EQGaE5jsE+F1xdZee+pQ0AlG9C0GWPbIortVAzUc6EPEbTKt/pP9BYv5qHMHv6 YbHHE0dFO4JxBKIIQ2mUOSAWGP9BTOMG2UhJCyvaaprb3jIkWcD0kpJNrlyCGKDjJlcC p5NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="phqMBfw/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si7626811pgr.489.2019.02.11.06.31.16; Mon, 11 Feb 2019 06:31:32 -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="phqMBfw/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729265AbfBKOaF (ORCPT + 99 others); Mon, 11 Feb 2019 09:30:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:36352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727691AbfBKOaD (ORCPT ); Mon, 11 Feb 2019 09:30:03 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 58DF220844; Mon, 11 Feb 2019 14:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895402; bh=OAGpevJw+RkPqR3lTAb9JoRwW85cQ8/+J84TCgtfSlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=phqMBfw/3tyPveW28nFtTIcXqp67yUZtfdT3KmDg4gPRqusxNKf49j7Hq4lJutnGY G36qipGxj5OoDhB5p3xsLopkYU3UMMuxWzVGDgbSFWtVCvHzRaGrs1EJ2JG3tINoBD ESwfPRFb9ySXHIjoOwd0/+rIxRydJCAakxEXl48E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Smythies , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.20 194/352] tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file Date: Mon, 11 Feb 2019 15:17:01 +0100 Message-Id: <20190211141859.482191244@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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