From mboxrd@z Thu Jan 1 00:00:00 1970 From: tglx@linutronix.de (Thomas Gleixner) Date: Thu, 13 Jan 2011 12:21:30 +0100 (CET) Subject: BUG: spinlock recursion (sys_chdir, user_path_at, do_path_lookup ...) In-Reply-To: <1294917467.19601.94.camel@laptop> References: <20110112210241.GM24920@pengutronix.de> <1294916460.19601.89.camel@laptop> <1294917467.19601.94.camel@laptop> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, 13 Jan 2011, Peter Zijlstra wrote: > > > On Wed, 2011-01-12 at 23:52 +0100, Thomas Gleixner wrote: > > > > @peterz: Why does lockdep ignore the lock recursion in that > > > spin_lock_nested() call? > > So after some hints on IRC on where to look: > > spin_lock(&parent->d_lock); > spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); > if parent == dentry > > That won't yell because you explicitly tell lockdep its ok, I know what > I'm doing. > > Several lockdep annotations (including this one) allow you to annotate > real bugs away, hence you really need to be sure about things when you > make them. Yeah, I suspected that, but checking whether the pointers are same would be nice as it would tell us right away where we fcked up :)