From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [patch 1/4] rtmutex: Remove buggy BUG_ON in PI boosting code
Date: Tue, 25 Apr 2006 16:41:05 -0000 [thread overview]
Message-ID: <20060425162420.710609000@localhost.localdomain> (raw)
In-Reply-To: <20060425162414.896662000@localhost.localdomain>
[-- Attachment #1: rtmutex-bugon-fix.patch --]
[-- Type: text/plain, Size: 1571 bytes --]
From: Steven Rostedt <rostedt@goodmis.org>
The condition in that particular BUG_ON can legitimately be the
case, if you have processes A, B, C, D, and E holding the
following locks in this scenario:
L1 <=blocks= A
<=owns= L2 <=blocks= B <=owns= L4 <=blocks= D
<=owns= L3 <=blocks= C <=owns= L5 <=blocks= E
Where the priorities of these tasks are
B,C < A < D = E
B and C are less than A and A is less than D and E where D and E are
equal (actually it probably works when D and E are not equal too).
As D and E climb the chain, there's a very slight race condition that
could allow for the condition in the offending BUG_ON to be true.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/rtmutex.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: linux-2.6.17-rc1-mm3/kernel/rtmutex.c
===================================================================
--- linux-2.6.17-rc1-mm3.orig/kernel/rtmutex.c
+++ linux-2.6.17-rc1-mm3/kernel/rtmutex.c
@@ -209,10 +209,8 @@ static int rt_mutex_adjust_prio_chain(ta
* When deadlock detection is off then we check, if further
* priority adjustment is necessary.
*/
- if (!detect_deadlock && waiter->list_entry.prio == task->prio) {
- BUG_ON(waiter->pi_list_entry.prio != waiter->list_entry.prio);
+ if (!detect_deadlock && waiter->list_entry.prio == task->prio)
goto out_unlock_pi;
- }
lock = waiter->lock;
if (!spin_trylock(&lock->wait_lock)) {
--
next prev parent reply other threads:[~2006-04-25 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 16:41 [patch 0/4] futex-pi updates Thomas Gleixner
2006-04-25 16:41 ` Thomas Gleixner [this message]
2006-04-25 16:41 ` [patch 2/4] futex-pi: Enforce waiter bit when owner died is detected Thomas Gleixner
2006-04-25 16:41 ` [patch 3/4] rtmutex debug: printk correct task information Thomas Gleixner
2006-04-25 16:41 ` [patch 4/4] futex-pi: Make use of restart_block when interrupted Thomas Gleixner
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=20060425162420.710609000@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®