diff --git a/[refs] b/[refs] index 49d1158887ed..1dd322e4d546 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c0d1d2bf5a28f78def7b68ca1eb5ba31aafd43a1 +refs/heads/master: 1a539a87280b3032fd12bc93a4a82f1d8aa97ca8 diff --git a/trunk/kernel/rtmutex.c b/trunk/kernel/rtmutex.c index a273183c37a0..a6fbb4130521 100644 --- a/trunk/kernel/rtmutex.c +++ b/trunk/kernel/rtmutex.c @@ -189,6 +189,19 @@ int rt_mutex_adjust_prio_chain(struct task_struct *task, if (!waiter || !waiter->task) goto out_unlock_pi; + /* + * Check the orig_waiter state. After we dropped the locks, + * the previous owner of the lock might have released the lock + * and made us the pending owner: + */ + if (orig_waiter && !orig_waiter->task) + goto out_unlock_pi; + + /* + * Drop out, when the task has no waiters. Note, + * top_waiter can be NULL, when we are in the deboosting + * mode! + */ if (top_waiter && (!task_has_pi_waiters(task) || top_waiter != task_top_pi_waiter(task))) goto out_unlock_pi;