[patch] lock validator: rtmutex unlock order annotation

From: Ingo Molnar
Date: Thu Jun 22 2006 - 05:00:45 EST


Subject: lock validator: rtmutex unlock order annotation
From: Ingo Molnar <mingo@xxxxxxx>

rtmutex.c does a tricky piece of 'lock chain' logic spiced with trylock,
which has one particular codepath where we intentionally release the
locks in a different order as acquired. Annotate this for the lock
validator to not complain if CONFIG_DEBUG_NON_NESTED_UNLOCKS=y.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/rtmutex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/kernel/rtmutex.c
===================================================================
--- linux.orig/kernel/rtmutex.c
+++ linux/kernel/rtmutex.c
@@ -243,7 +243,8 @@ static int rt_mutex_adjust_prio_chain(ta
plist_add(&waiter->list_entry, &lock->wait_list);

/* Release the task */
- spin_unlock_irqrestore(&task->pi_lock, flags);
+ spin_unlock_non_nested(&task->pi_lock);
+ local_irq_restore(flags);
put_task_struct(task);

/* Grab the next task */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/