aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-01-26 13:21:27 +0000
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-01-26 13:21:27 +0000
commit3a71f3f3392a92c9a78a0b429c50c66fc589e307 (patch)
tree0ceeea186bec380570f6a9142073a70cbddc8938 /xen
parentbe1ff5e8f0f71f0927ec2681ec7f51ac2efe50d9 (diff)
downloadxen-3a71f3f3392a92c9a78a0b429c50c66fc589e307.tar.gz
xen-3a71f3f3392a92c9a78a0b429c50c66fc589e307.tar.bz2
xen-3a71f3f3392a92c9a78a0b429c50c66fc589e307.zip
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@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/x86/mm/mm-locks.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/mm/mm-locks.h b/xen/arch/x86/mm/mm-locks.h
index 43dade2b90..9f8413d2b0 100644
--- a/xen/arch/x86/mm/mm-locks.h
+++ b/xen/arch/x86/mm/mm-locks.h
@@ -61,7 +61,8 @@ do { \
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);
spin_lock_recursive(&l->lock);
if ( l->lock.recurse_cnt == 1 )
{