Re: 2.6.11-rc2-mm1

From: Paulo Marques
Date: Tue Jan 25 2005 - 10:41:46 EST


Evgeniy Polyakov wrote:
[...]
No, it is not called lock order reversal.

There are no places like
lock a
lock b
unlock a
unlock b

This would be perfectly fine. The order of unlocking doesn't really matter. It is the actual locking that must be carried out on the same order everywhere to guarantee that there are no deadlocks.

and if they are, then I'm completely wrong.

What you see is only following:

place 1:
lock a
lock b
unlock b
lock c
unlock c
unlock a

place 2:
lock b
lock a
unlock a
lock c
unlock c
unlock b

I haven't look at the code yet, but this is a deadlock waiting to happen. "place 1" gets "lock a", then is interrupted and "place 2" gets "lock b". "place 2" waits forever for "lock a" and "place 1" waits forever for "lock b". Deadlock.

--
Paulo Marques - www.grupopie.com

"A journey of a thousand miles begins with a single step."
Lao-tzu, The Way of Lao-tzu

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