Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a539a87280b3032fd12bc93a4a82f1d8aa97ca8 Commit: 1a539a87280b3032fd12bc93a4a82f1d8aa97ca8 Parent: c0d1d2bf5a28f78def7b68ca1eb5ba31aafd43a1 Author: Thomas Gleixner <[EMAIL PROTECTED]> AuthorDate: Fri Jun 8 13:46:58 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Fri Jun 8 17:23:34 2007 -0700
rt-mutex: fix chain walk early wakeup bug Alexey Kuznetsov found some problems in the pi-futex code. One of the root causes is: When a wakeup happens, we do not to stop the chain walk so we follow a not longer relevant locking chain. Drop out when this happens. Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> Acked-by: Ingo Molnar <[EMAIL PROTECTED]> Cc: Steven Rostedt <[EMAIL PROTECTED]> Cc: Alexey Kuznetsov <[EMAIL PROTECTED]> Cc: Ulrich Drepper <[EMAIL PROTECTED]> Cc: Eric Dumazet <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- kernel/rtmutex.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index a273183..a6fbb41 100644 --- a/kernel/rtmutex.c +++ b/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; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html