[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/mm: Avoid spurious deadlock panic trigger

# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1327584087 0
# Node ID 570d0ea0ad2fbcc4e7ba21c1dce92b7b5811c3ae
# Parent  496a9874d08ec9234693452e527ad1454d113676
x86/mm: Avoid spurious deadlock panic trigger

In the mm layer, if we take lock A, then lock B, and the recursively lock A,
the deadlock detector panics. This is not a deadlock risk because we
already 'own' the outer lock (A), so we will not contend for that resource.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>

diff -r 496a9874d08e -r 570d0ea0ad2f xen/arch/x86/mm/mm-locks.h
--- a/xen/arch/x86/mm/mm-locks.h        Thu Jan 26 13:21:27 2012 +0000
+++ b/xen/arch/x86/mm/mm-locks.h        Thu Jan 26 13:21:27 2012 +0000
@@ -61,7 +61,8 @@
 static inline void _mm_lock(mm_lock_t *l, const char *func, int level, int rec)
-    __check_lock_level(level);
+    if ( !((mm_locked_by_me(l)) && rec) ) 
+        __check_lock_level(level);
     if ( l->lock.recurse_cnt == 1 )

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.