All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: [patch] lock validator: rtmutex unlock order annotation
Date: Thu, 22 Jun 2006 10:57:06 +0200	[thread overview]
Message-ID: <20060622085706.GA29136@elte.hu> (raw)

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 */

             reply	other threads:[~2006-06-22  9:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22  8:57 Ingo Molnar [this message]
2006-06-23  1:40 ` [patch] lock validator: rtmutex unlock order annotation Andrew Morton
2006-06-23  7:11   ` 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=20060622085706.GA29136@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.