Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c67b408 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf: Fix free_event()



With the context rework stuff we can actually end up freeing an event
before it gets attached to a context.

Reported-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent cde8e884
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2150,7 +2150,9 @@ static void free_event(struct perf_event *event)
	if (event->destroy)
		event->destroy(event);

	if (event->ctx)
		put_ctx(event->ctx);

	call_rcu(&event->rcu_head, free_event_rcu);
}