Hi Sven
This reminds me of something i keep intending to do, but never get around to.
It would be nice to have a LOCKING.TXT document, with the following Table of Contents.
1) What locks we have and what they protect.
2) What different contexts different parts of the code run in.
These two sections provide the basis for the following sections.
3) Which locking primitives, ie spin_lock() or spin_lock_irqsave() should be used for each lock.
4) A list of what order locks should be taken in, when taking multiple locks, so as to avoid deadlocks.
When finding this bug, did you take any notes etc, which could contribute to such a document?
Thanks Andrew