[lkml]   [2008]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH 7/7] lockdep: spin_lock_nest_lock()
Peter Zijlstra wrote:
>> 3. release the outer lock before releasing the inner locks
> Only if you then release the inner locks in the reverse order you took
> them - the nested release code (releasing a lock that is not on the top
> of the stack) basically pops and pushes all the locks, the push will
> fail if the outer lock is released.

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?

>> but it's not OK to try to use different outer locks for a given inner lock.
> It doesn't validate this part - as with most lockdep annotations you can
> annotate away real deadlocks.

Hm, OK.


 \ /
  Last update: 2008-08-04 21:29    [W:0.105 / U:5.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site