|
@@ -5913,6 +5913,7 @@ inherit_event(struct perf_event *parent_event,
|
|
struct perf_event_context *child_ctx)
|
|
struct perf_event_context *child_ctx)
|
|
{
|
|
{
|
|
struct perf_event *child_event;
|
|
struct perf_event *child_event;
|
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Instead of creating recursive hierarchies of events,
|
|
* Instead of creating recursive hierarchies of events,
|
|
@@ -5957,7 +5958,9 @@ inherit_event(struct perf_event *parent_event,
|
|
/*
|
|
/*
|
|
* Link it up in the child's context:
|
|
* Link it up in the child's context:
|
|
*/
|
|
*/
|
|
|
|
+ raw_spin_lock_irqsave(&child_ctx->lock, flags);
|
|
add_event_to_ctx(child_event, child_ctx);
|
|
add_event_to_ctx(child_event, child_ctx);
|
|
|
|
+ raw_spin_unlock_irqrestore(&child_ctx->lock, flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Get a reference to the parent filp - we will fput it
|
|
* Get a reference to the parent filp - we will fput it
|