Commit fa7eadab authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'core-fixes-for-linus' of...

Merge branch 'core-fixes-for-linus' of git://

* 'core-fixes-for-linus' of git://
  mutex: Fix optimistic spinning vs. BKL
parents bc7d352c fd6be105
......@@ -171,6 +171,13 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
for (;;) {
struct thread_info *owner;
* If we own the BKL, then don't spin. The owner of
* the mutex might be waiting on us to release the BKL.
if (unlikely(current->lock_depth >= 0))
* If there's an owner, wait for it to either
* release the lock or go to sleep.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment