+ rtmutex-remove-buggy-bug_on-in-pi-boosting-code.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     rtmutex: Remove buggy BUG_ON in PI boosting code

has been added to the -mm tree.  Its filename is

     rtmutex-remove-buggy-bug_on-in-pi-boosting-code.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Steven Rostedt <rostedt@xxxxxxxxxxx>

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@xxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/rtmutex.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN kernel/rtmutex.c~rtmutex-remove-buggy-bug_on-in-pi-boosting-code kernel/rtmutex.c
--- 25/kernel/rtmutex.c~rtmutex-remove-buggy-bug_on-in-pi-boosting-code	Wed Apr 26 14:24:18 2006
+++ 25-akpm/kernel/rtmutex.c	Wed Apr 26 14:24:18 2006
@@ -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)) {
_

Patches currently in -mm which might be from rostedt@xxxxxxxxxxx are

fix-for-serial-uart-lockup.patch
jbd-avoid-kfree-null.patch
ext3_clear_inode-avoid-kfree-null.patch
rtmutex-remove-buggy-bug_on-in-pi-boosting-code.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux