Is it worth adding MUST_NOT_HOLD(&lock) in an attempt to catch potential
deadlocks?
Say that if two or more of locks A, B and C are to be taken, then
they must be taken in that order. You might then have code like:
MUST_NOT_HOLD(&lock_B) ;
MUST_NOT_HOLD(&lock_C) ;
spinlock(&lock_A) ;
I think you need a separate asertion for this !MUST_NOT_HOLD(&lock)
has different semantics.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/