diff options
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 90a440cbd6de..65548eff029e 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -82,6 +82,8 @@ static int graph_lock(void) | |||
82 | __raw_spin_unlock(&lockdep_lock); | 82 | __raw_spin_unlock(&lockdep_lock); |
83 | return 0; | 83 | return 0; |
84 | } | 84 | } |
85 | /* prevent any recursions within lockdep from causing deadlocks */ | ||
86 | current->lockdep_recursion++; | ||
85 | return 1; | 87 | return 1; |
86 | } | 88 | } |
87 | 89 | ||
@@ -90,6 +92,7 @@ static inline int graph_unlock(void) | |||
90 | if (debug_locks && !__raw_spin_is_locked(&lockdep_lock)) | 92 | if (debug_locks && !__raw_spin_is_locked(&lockdep_lock)) |
91 | return DEBUG_LOCKS_WARN_ON(1); | 93 | return DEBUG_LOCKS_WARN_ON(1); |
92 | 94 | ||
95 | current->lockdep_recursion--; | ||
93 | __raw_spin_unlock(&lockdep_lock); | 96 | __raw_spin_unlock(&lockdep_lock); |
94 | return 0; | 97 | return 0; |
95 | } | 98 | } |