Received: by 10.223.185.116 with SMTP id b49csp1067377wrg; Fri, 23 Feb 2018 11:19:04 -0800 (PST) X-Google-Smtp-Source: AH8x2268LASphJUARUaj6oktr1xGnbF3zO/whebqrpfOqWKqpP2sHJ9/wEyaDviaOFJ+7N6YXJ0c X-Received: by 2002:a17:902:6c06:: with SMTP id q6-v6mr2693299plk.142.1519413544013; Fri, 23 Feb 2018 11:19:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519413543; cv=none; d=google.com; s=arc-20160816; b=AX7GzRB6zSyyAjDs/LAV3CiSh8X7XuZAsQ3Rb6JlbW0ZDp/tPjbc3wofNyHKXn3UFg dFs6xj9XTCBea9fnSX6qBLUEJ8QmehXxpXegXSC5OmdJfS2dTZTNgOLULfI/yUur4O5m Sj55II3kNGM/U+PMKY9U79y1JaI1GnkQhk86zopmQfG3a9XDivtoL0h1kt2N0tm7mI9h JySC+NWOoby6jKLCMIHLJGj5ovzazw2xSd4F5G4nLCcr91djj6Rjl97oydaXpxQsptSI vtkNOGFLbEEQMYGCE90cKTqZ0i2Tv+FusM6dsqNTeLmu5ZpczTFvXlyTP6pptxh7SkZr Pw2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fsN9sDqWhjMhTV/gu8BQkWlU2Bgz6r8LlvAmNpKVVDU=; b=qDjv7DYAwddxAS2iRiSjGjs35bvBX2BqDcthqMSFnjbtRNhEwUuFemwoBENBVXPEUF UkY/sEgsMhwmyyMBZwFubY09ob8np66NsHFaNsC0GosZK6pcJvX02ffbhsIv8l38QQ37 w6LS4YxgSSYZ+o7OzbjtthVf4i7xA3l9F3t8oO0mE6zfgm4It8R75UPUv1I64eb3dHK/ tsk/Ny6qaADgU6BI2Z10RWcg9HKXm6a3QfIqKRIfnHm7Va/SRVQtp7oR+lCU/TSUTOhA 6jqYlLbO+KuQ7ufCEUWhKmArFzlCbDYHwo2QTKPoGcAx87Swtd8jnhUHHuQYxYXbC6gX 59wQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si2184994pld.236.2018.02.23.11.18.49; Fri, 23 Feb 2018 11:19:03 -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; 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 S935523AbeBWSyp (ORCPT + 99 others); Fri, 23 Feb 2018 13:54:45 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47880 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935511AbeBWSyn (ORCPT ); Fri, 23 Feb 2018 13:54:43 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A69CA1217; Fri, 23 Feb 2018 18:54:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Olsa , "Peter Zijlstra (Intel)" , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.14 072/159] perf: Fix header.size for namespace events Date: Fri, 23 Feb 2018 19:26:20 +0100 Message-Id: <20180223170752.315968001@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiri Olsa [ Upstream commit 34900ec5c9577cc1b0f22887ac7349f458ba8ac2 ] Reset header size for namespace events, otherwise it only gets bigger in ctx iterations. Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra (Intel) Fixes: e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") Link: http://lkml.kernel.org/n/tip-nlo4gonz9d4guyb8153ukzt0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- kernel/events/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -6719,6 +6719,7 @@ static void perf_event_namespaces_output struct perf_namespaces_event *namespaces_event = data; struct perf_output_handle handle; struct perf_sample_data sample; + u16 header_size = namespaces_event->event_id.header.size; int ret; if (!perf_event_namespaces_match(event)) @@ -6729,7 +6730,7 @@ static void perf_event_namespaces_output ret = perf_output_begin(&handle, event, namespaces_event->event_id.header.size); if (ret) - return; + goto out; namespaces_event->event_id.pid = perf_event_pid(event, namespaces_event->task); @@ -6741,6 +6742,8 @@ static void perf_event_namespaces_output perf_event__output_id_sample(event, &handle, &sample); perf_output_end(&handle); +out: + namespaces_event->event_id.header.size = header_size; } static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info,