mutex-debug: check mutex magic before owner
authorJeremy Kerr <jk@ozlabs.org>
Wed, 14 May 2008 23:22:58 +0000 (16:22 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 16 May 2008 14:53:35 +0000 (16:53 +0200)
Currently, the mutex debug code checks the lock->owner before lock->magic, so
a corrupt mutex will most likely result in failing the owner check, rather
than the magic check.

This change to debug_mutex_unlock does the magic check first, so
we have a better idea of what breaks.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

No differences found