lkml.org 
[lkml]   [2008]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 4 Aug 2008 12:31:22 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [RFC][PATCH 7/7] lockdep: spin_lock_nest_lock()


On Mon, 4 Aug 2008, Jeremy Fitzhardinge wrote:
>
> 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?

Release order should always be totally irrelevant, whether you hold outer
locks or not. Only the order of _getting_ locks matter.

And yes, if there is an outer lock, even the order of getting locks is
irrelevant, as long as anybody who gets more than one inner lock always
holds the outer one.

Linus


\
 
 \ /
  Last update: 2008-08-04 21:35    [from the cache]
©2003-2010