Re: 2.6.17-rc5-mm3: bad unlock ordering (reiser4?)

Ingo Molnar
2006-06-05T12:51:12Z

* Alexander Zarochentsev <zam@namesys.com> wrote:

> I think the txnh lock and the tmgr lock are _non_nested. [...]

ok - that's what the two changes i did do.

> [...] And, there is a place where two atom locks are taken in
> deadlock-free order w/o always keeping correct order of unlocking.
> The latest thing can be made lock-validator-friendly.

could you send a patch for that? When there is single-depth nesting of
two atom-locks then the annotation is easy, instead of:

spin_lock(&atom->alock);

you should do:

spin_lock_nested(&atom->alock, SINGLE_DEPTH_NESTING)

for the unordered unlocks, just change the one that is non-nested to
spin_unlock_non_nested(). (the second lock can stay spin_unlock() - that
will be in order again)

Ingo