From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756153AbYD2RFL (ORCPT ); Tue, 29 Apr 2008 13:05:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751977AbYD2RE6 (ORCPT ); Tue, 29 Apr 2008 13:04:58 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:50860 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbYD2RE5 (ORCPT ); Tue, 29 Apr 2008 13:04:57 -0400 Subject: Re: [PATCH 1/8] lockdep: fix recursive read lock validation From: Peter Zijlstra To: Bart Van Assche Cc: ego@in.ibm.com, linux-kernel@vger.kernel.org, Zdenek Kabelac , Oleg Nesterov , Heiko Carstens , "Rafael J. Wysocki" , Andrew Morton , Ingo Molnar , Srivatsa Vaddagiri In-Reply-To: References: <20080429125659.GA23562@in.ibm.com> <20080429125750.GB23562@in.ibm.com> <1209481050.13978.72.camel@twins> <1209482101.13978.91.camel@twins> <1209485739.13978.96.camel@twins> Content-Type: text/plain Date: Tue, 29 Apr 2008 19:04:03 +0200 Message-Id: <1209488643.6433.14.camel@lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2008-04-29 at 18:29 +0200, Bart Van Assche wrote: > On Tue, Apr 29, 2008 at 6:15 PM, Peter Zijlstra wrote: > > > > > Or: whether or not to allow a sequence like "rlock(a); rlock(b); > > > runlock(b); runlock(a); rlock(b); rlock(a);" is something we can > > > choose. We do not have to forbid this sequence -- we can choose > > > whether or not we allow this sequence. > > > > I'm utterly confused now; I never argued that it would get deadlocks; > > and I said I choose to not allow it from a lockdep pov. What else do you > > want? > > So we both agree that the statement in the original e-mail (by Gautham > R Shenoy) is wrong ? The original e-mail stated that obtaining reader > locks in an inconsistent order is wrong. I think the critical part is: > It really is invalid when considered against write locks. Aside from that it just states that inversion of lock order will be treated as invalid - even for read locks.