public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] lock validator: rtmutex unlock order annotation
@ 2006-06-22  8:57 Ingo Molnar
  2006-06-23  1:40 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2006-06-22  8:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Thomas Gleixner

Subject: lock validator: rtmutex unlock order annotation
From: Ingo Molnar <mingo@elte.hu>

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@elte.hu>
---
 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 */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-23  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22  8:57 [patch] lock validator: rtmutex unlock order annotation Ingo Molnar
2006-06-23  1:40 ` Andrew Morton
2006-06-23  7:11   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox