Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar. * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ftrace: Make all inline tags also include notrace perf: Use css_tryget() to avoid propping up css refcount perf tools: Fix synthesizing tracepoint names from the perf.data headers perf stat: Fix default output file perf tools: Fix endianity swapping for adds_features bitmask
This commit is contained in:
@@ -253,9 +253,9 @@ perf_cgroup_match(struct perf_event *event)
|
||||
return !event->cgrp || event->cgrp == cpuctx->cgrp;
|
||||
}
|
||||
|
||||
static inline void perf_get_cgroup(struct perf_event *event)
|
||||
static inline bool perf_tryget_cgroup(struct perf_event *event)
|
||||
{
|
||||
css_get(&event->cgrp->css);
|
||||
return css_tryget(&event->cgrp->css);
|
||||
}
|
||||
|
||||
static inline void perf_put_cgroup(struct perf_event *event)
|
||||
@@ -484,7 +484,11 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event,
|
||||
event->cgrp = cgrp;
|
||||
|
||||
/* must be done before we fput() the file */
|
||||
perf_get_cgroup(event);
|
||||
if (!perf_tryget_cgroup(event)) {
|
||||
event->cgrp = NULL;
|
||||
ret = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* all events in a group must monitor
|
||||
|
||||
Reference in New Issue
Block a user