[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 08, 2013 at 03:50:48PM +0200, Jiri Olsa wrote:
> patch below gets rid of the warning, and probably the
> crash as well
> 
> the reason seems to be when HW context is cloned based
> on SW event that happened to get there because of the
> HW leader, which got closed just before (fd[15] event
> in the reproducer)
> 
> and the consequence is that in HW context we access
> SW's cpuctx -> and thus overwriting its task_ctx variable
> any time there's *sched_in routine
> 
> need to check if that does not break anything else ;-)
> 
> jirka
> 
> ---
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 1833bc5..1d1f030 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -7465,7 +7465,7 @@ inherit_task_group(struct perf_event *event, struct task_struct *parent,
>  		 * child.
>  		 */
>  
> -		child_ctx = alloc_perf_context(event->pmu, child);
> +		child_ctx = alloc_perf_context(parent_ctx->pmu, child);
>  		if (!child_ctx)
>  			return -ENOMEM;
>  

Ha! very good catch. Thanks!
--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux