Re: lockdep, false positive ?

From: Peter Zijlstra
Date: Wed Apr 09 2008 - 12:16:34 EST


On Wed, 2008-04-09 at 12:11 -0400, Dmitry Torokhov wrote:
> Hi Peter,
>
> On Wed, Apr 09, 2008 at 11:44:41AM +0200, Peter Zijlstra wrote:
> >
> > Yes, if both locks are of the same class it will report this. Lockdep
> > does lock chain validation on classes, never on individual locks.
> >
> > A class usually consists of all locks that share the lock init site; but
> > there are ways to explicity set another class.
> >
> > In case of these recursions we have helpers like spin_lock_nested(&lock,
> > subclass) that allow you to annotate these. These sub-classes must then
> > always be taken in the same order; subclass < 8.
> >
> > In this case its probably easier to explicity set a class, as the
> > nesting is not exposed to the input layer, so it doesn't know about it.
> >
>
> Is there a way in lockdep to mark all instances of a given lock as distinct?
> I'd rather do that in input core once and be done with it.

Nope. Do you have a lot of nesting in input?

> Also another question I've been meaning to ask - we have lockdep annotations
> in serio code and they work fine first time around but if you reload
> psmouse module lockdep will barf if you have SYnaptics touchpad with
> pass-through port. What gives?

Could you show me one such dump? - And yes, module reloading is a tad
tricky, but it should work for a while.

--
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/