diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/mutex.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/mutex.c b/kernel/mutex.c index 632f04c57d82..4c0b7b3e6d2e 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c | |||
@@ -172,6 +172,13 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, | |||
172 | struct thread_info *owner; | 172 | struct thread_info *owner; |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * If we own the BKL, then don't spin. The owner of | ||
176 | * the mutex might be waiting on us to release the BKL. | ||
177 | */ | ||
178 | if (unlikely(current->lock_depth >= 0)) | ||
179 | break; | ||
180 | |||
181 | /* | ||
175 | * If there's an owner, wait for it to either | 182 | * If there's an owner, wait for it to either |
176 | * release the lock or go to sleep. | 183 | * release the lock or go to sleep. |
177 | */ | 184 | */ |