From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754025AbbEAOQb (ORCPT ); Fri, 1 May 2015 10:16:31 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:40177 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753942AbbEAOQa (ORCPT ); Fri, 1 May 2015 10:16:30 -0400 Date: Fri, 1 May 2015 16:15:57 +0200 From: Peter Zijlstra To: Sasha Levin Cc: "Paul E. McKenney" , Ingo Molnar , Steven Rostedt , acme@ghostprotocols.net, LKML , Dave Jones , jolsa@redhat.com, vincent.weaver@maine.edu Subject: Re: perf: recursive locking of ctx->mutex Message-ID: <20150501141557.GC24151@twins.programming.kicks-ass.net> References: <5542466F.7070803@oracle.com> <20150501141337.GG5029@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501141337.GG5029@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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..