Thread (26 messages) 26 messages, 7 authors, 2017-10-23

Re: [PATCH v2 2/3] lockdep: Remove BROKEN flag of LOCKDEP_CROSSRELEASE

From: Thomas Gleixner <hidden>
Date: 2017-10-19 20:53:13
Also in: lkml

On Thu, 19 Oct 2017, Bart Van Assche wrote:
On Thu, 2017-10-19 at 13:33 -0700, Matthew Wilcox wrote:
quoted
For example, the page lock is not annotatable with lockdep -- we return
to userspace with it held, for heaven's sake!  So it is quite easy for
someone not familiar with the MM locking hierarchy to inadvertently
introduce an ABBA deadlock against the page lock.  (ie me.  I did that.)
Right now, that has to be caught by a human reviewer; if cross-release
checking can catch that, then it's worth having.
Hello Matthew,

Although I agree that enabling lock inversion checking for page locks is
useful, I think my questions still apply to other locking objects than page
locks.
Why are other objects any different?

    lock(L)   ->      wait_for_completion(A)
    lock(L)   ->      complete(A)

is a simple ABBA and they exist and have not been caught for a long time
until they choked a production machine.

Thanks,

	tglx




--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help