public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Ulrich Drepper <drepper@redhat.com>
Subject: Re: [patch 2/4] rt-mutex: Fix chain walk early wakeup bug
Date: Fri, 8 Jun 2007 09:18:41 +0200	[thread overview]
Message-ID: <20070608071841.GC30226@elte.hu> (raw)
In-Reply-To: <20070607235801.494414000@linutronix.de>


* Thomas Gleixner <tglx@linutronix.de> wrote:

> +++ linux-2.6.22-rc4/kernel/rtmutex.c	2007-06-08 01:39:38.000000000 +0200
> @@ -189,6 +189,19 @@ int rt_mutex_adjust_prio_chain(struct ta
>  	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;

nice fix! I'm wondering why we never triggered this case with in-kernel 
locks in -rt?

Acked-by: Ingo Molnar <mingo@elte.hu>

	Ingo

  reply	other threads:[~2007-06-08  7:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08  0:29 [patch 0/4] PI-Futex bugfixes and cleanups Thomas Gleixner
2007-06-08  0:29 ` [patch 1/4] rt-mutex: Fix stale return value Thomas Gleixner
2007-06-08  7:20   ` Ingo Molnar
2007-06-08  0:29 ` [patch 2/4] rt-mutex: Fix chain walk early wakeup bug Thomas Gleixner
2007-06-08  7:18   ` Ingo Molnar [this message]
2007-06-08  0:29 ` [patch 3/4] pi-futex: Fix exit races and locking problems Thomas Gleixner
2007-06-08  7:16   ` Ingo Molnar
2007-06-08  0:29 ` [patch 4/4] FUTEX: Tidy up the code Thomas Gleixner
2007-06-08  7:10   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070608071841.GC30226@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=drepper@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox