Skip to content

Commit fae3fde

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
perf: Collapse and fix event_function_call() users
There is one common bug left in all the event_function_call() users, between loading ctx->task and getting to the remote_function(), ctx->task can already have been changed. Therefore we need to double check and retry if ctx->task != current. Insert another trampoline specific to event_function_call() that checks for this and further validates state. This also allows getting rid of the active/inactive functions. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 32132a3 commit fae3fde

File tree

3 files changed

+168
-201
lines changed

3 files changed

+168
-201
lines changed

include/linux/perf_event.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ extern void perf_swevent_put_recursion_context(int rctx);
10441044
extern u64 perf_swevent_set_period(struct perf_event *event);
10451045
extern void perf_event_enable(struct perf_event *event);
10461046
extern void perf_event_disable(struct perf_event *event);
1047-
extern int __perf_event_disable(void *info);
1047+
extern void perf_event_disable_local(struct perf_event *event);
10481048
extern void perf_event_task_tick(void);
10491049
#else /* !CONFIG_PERF_EVENTS: */
10501050
static inline void *

0 commit comments

Comments
 (0)