lkml.org 
[lkml]   [2021]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 01/11] perf: Rework perf_event_exit_event()
On Thu, Mar 25, 2021 at 08:10:51PM +0100, Marco Elver wrote:

> and therefore synthesized this fix on top:
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 57de8d436efd..e77294c7e654 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -12400,7 +12400,7 @@ static void sync_child_event(struct perf_event *child_event)
> if (child_event->attr.inherit_stat) {
> struct task_struct *task = child_event->ctx->task;
>
> - if (task)
> + if (task && task != TASK_TOMBSTONE)
> perf_event_read_event(child_event, task);
> }
>
> which fixes the problem. My guess is that the parent and child are both
> racing to exit?
>
> Does that make any sense?

Yes, I think it does. ACK

\
 
 \ /
  Last update: 2021-03-29 13:51    [W:0.045 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site