[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120329031136.GA2062@zhy>
Date: Thu, 29 Mar 2012 11:11:37 +0800
From: Yong Zhang <yong.zhang0@...il.com>
To: Sven Eckelmann <sven@...fation.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
simon.wunderlich@...03.tu-chemnitz.de,
Marek Lindner <lindner_marek@...oo.de>
Subject: Re: Using nested locking for spin_lock_bh
On Wed, Mar 28, 2012 at 06:36:39PM +0200, Sven Eckelmann wrote:
> Hi,
>
> I started to run some experimental batman-adv code inside some virtual
> machines with different debugging functions enabled. One of them was lockdep.
> There we noticed a false positive for a lock class that is actually used in
> two different data structures.
Hmm, I think you can initialize the lock class in the two differnent data
structures with differnt lock_class_key.
Thanks,
Yong
> Therefore, lockdep noticed that there could be
> a deadlock for this class in a function that locks the two different data
> structures.
>
> To resolve this problem, I wanted to define two different subclasses and
> replace the spin_lock_bh with its nested version. The only problem now is the
> absence of spin_lock_bh_nested. I could only find spin_lock_bh and
> spin_lock_irqsave_nested.
>
> Is there another way how this should be done or is there a general problem why
> there is no nested support for this incarnation of spin_lock?
>
> Kind regards,
> Sven
--
Only stand for myself
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists