Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762202AbYHDTjR (ORCPT ); Mon, 4 Aug 2008 15:39:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755929AbYHDTjB (ORCPT ); Mon, 4 Aug 2008 15:39:01 -0400 Received: from viefep11-int.chello.at ([62.179.121.31]:57942 "EHLO viefep11-int.chello.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754402AbYHDTjA (ORCPT ); Mon, 4 Aug 2008 15:39:00 -0400 Subject: Re: [RFC][PATCH 7/7] lockdep: spin_lock_nest_lock() From: Peter Zijlstra To: Linus Torvalds Cc: Jeremy Fitzhardinge , David Miller , hugh@veritas.com, mingo@elte.hu, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, davej@redhat.com In-Reply-To: References: <20080804130317.994042639@chello.nl> <20080804131012.246115111@chello.nl> <48974512.7000206@goop.org> <1217876046.3589.61.camel@twins> <489757EC.3000309@goop.org> Content-Type: text/plain Date: Mon, 04 Aug 2008 21:39:02 +0200 Message-Id: <1217878742.3589.70.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 24 On Mon, 2008-08-04 at 12:31 -0700, Linus Torvalds wrote: > > On Mon, 4 Aug 2008, Jeremy Fitzhardinge wrote: > > > > OK. I don't actually need to do this, but I was asking for completeness. But > > to clarify, you only need to do the reverse unlock if you do it after > > unlocking the outer lock? If you're still holding the outer lock, you can > > unlock in any order? > > Release order should always be totally irrelevant, whether you hold outer > locks or not. Only the order of _getting_ locks matter. > > And yes, if there is an outer lock, even the order of getting locks is > irrelevant, as long as anybody who gets more than one inner lock always > holds the outer one. I agree, its just non-trivial to convince lockdep of this. I can give it a go though. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/