Re: perf: recursive locking of ctx->mutex

From: Peter Zijlstra
Date: Fri May 01 2015 - 10:16:34 EST


On Fri, May 01, 2015 at 04:13:37PM +0200, Peter Zijlstra wrote:
>
> A little something like so should cure that me thinks.
>
> I would much appreciate other people reviewing this with care though; my
> snot addled brain isn't too bright.
>
>
> @@ -8728,7 +8753,7 @@ static int perf_event_init_context(struc
> * Lock the parent list. No need to lock the child - not PID
> * hashed yet and not running, so nobody can access it.
> */
> - mutex_lock(&parent_ctx->mutex);
> + mutex_lock_nested(&parent_ctx->mutex);
>
> /*
> * We dont have to disable NMIs - we are only looking at

It will help with building to not apply this last hunk..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/