lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1477787923-61185-22-git-send-email-davidcc@google.com>
Date:   Sat, 29 Oct 2016 17:38:18 -0700
From:   David Carrillo-Cisneros <davidcc@...gle.com>
To:     linux-kernel@...r.kernel.org
Cc:     "x86@...nel.org" <x86@...nel.org>, Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andi Kleen <ak@...ux.intel.com>,
        Kan Liang <kan.liang@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Vegard Nossum <vegard.nossum@...il.com>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Nilay Vaish <nilayvaish@...il.com>,
        Borislav Petkov <bp@...e.de>,
        Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Paul Turner <pjt@...gle.com>,
        Stephane Eranian <eranian@...gle.com>,
        David Carrillo-Cisneros <davidcc@...gle.com>
Subject: [PATCH v3 21/46] perf/x86/intel/cmt: use newly introduced event_terminate

The change from event_destroy to event_terminate allows to check
if the event is a event cgroup during event destuction, before
generic code clears event->cgrp.

Signed-off-by: David Carrillo-Cisneros <davidcc@...gle.com>
---
 arch/x86/events/intel/cmt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/events/intel/cmt.c b/arch/x86/events/intel/cmt.c
index a5b7d2d..f7da8cf 100644
--- a/arch/x86/events/intel/cmt.c
+++ b/arch/x86/events/intel/cmt.c
@@ -1349,7 +1349,7 @@ static int intel_cmt_event_add(struct perf_event *event, int mode)
 	return 0;
 }
 
-static void intel_cmt_event_destroy(struct perf_event *event)
+static void intel_cmt_event_terminate(struct perf_event *event)
 {
 	struct monr *monr;
 
@@ -1385,8 +1385,6 @@ static int intel_cmt_event_init(struct perf_event *event)
 	    event->attr.sample_period) /* no sampling */
 		return -EINVAL;
 
-	event->destroy = intel_cmt_event_destroy;
-
 	INIT_LIST_HEAD(&event->hw.cmt_list);
 
 	mutex_lock(&cmt_mutex);
@@ -1439,6 +1437,7 @@ static struct pmu intel_cmt_pmu = {
 	.attr_groups	     = intel_cmt_attr_groups,
 	.task_ctx_nr	     = perf_sw_context,
 	.event_init	     = intel_cmt_event_init,
+	.event_terminate     = intel_cmt_event_terminate,
 	.add		     = intel_cmt_event_add,
 	.del		     = intel_cmt_event_stop,
 	.start		     = intel_cmt_event_start,
-- 
2.8.0.rc3.226.g39d4020

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ