]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mm: BUG() rather than panic() on mm lock order violations
authorTim Deegan <tim@xen.org>
Wed, 18 Apr 2012 15:43:13 +0000 (16:43 +0100)
committerTim Deegan <tim@xen.org>
Wed, 18 Apr 2012 15:43:13 +0000 (16:43 +0100)
That gives us a backtrace showing where the bad lock happens.

Reported-by: Andres Lagar-Cavilla <andres@lagarcavilla.org
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/mm-locks.h

index c973b4672bf52acbb2cce3082ab79cf512e9a321..8f5c7f5a1430c44c50fde3fa0f10b72d59f3d7c2 100644 (file)
@@ -50,8 +50,11 @@ static inline int mm_locked_by_me(mm_lock_t *l)
 #define __check_lock_level(l)                           \
 do {                                                    \
     if ( unlikely(__get_lock_level()) > (l) )           \
-        panic("mm locking order violation: %i > %i\n",  \
-              __get_lock_level(), (l));                 \
+    {                                                   \
+        printk("mm locking order violation: %i > %i\n", \
+               __get_lock_level(), (l));                \
+        BUG();                                          \
+    }                                                   \
 } while(0)
 
 #define __set_lock_level(l)         \