From: "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: alexander.levin@verizon.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, hpa@zytor.com, peterz@infradead.org,
tglx@linutronix.de, torvalds@linux-foundation.org
Subject: [tip:locking/core] locking/rtmutex: Don't initialize lockdep when not required
Date: Tue, 20 Jun 2017 06:19:21 -0700 [thread overview]
Message-ID: <tip-cde50a67397c0da7d11795d4b4418384022ab8e6@git.kernel.org> (raw)
In-Reply-To: <20170618140548.4763-1-alexander.levin@verizon.com>
Commit-ID: cde50a67397c0da7d11795d4b4418384022ab8e6
Gitweb: http://git.kernel.org/tip/cde50a67397c0da7d11795d4b4418384022ab8e6
Author: Levin, Alexander (Sasha Levin) <alexander.levin@verizon.com>
AuthorDate: Sun, 18 Jun 2017 14:06:01 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 20 Jun 2017 11:53:09 +0200
locking/rtmutex: Don't initialize lockdep when not required
pi_mutex isn't supposed to be tracked by lockdep, but just
passing NULLs for name and key will cause lockdep to spew a
warning and die, which is not what we want it to do.
Skip lockdep initialization if the caller passed NULLs for
name and key, suggesting such initialization isn't desired.
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: f5694788ad8d ("rt_mutex: Add lockdep annotations")
Link: http://lkml.kernel.org/r/20170618140548.4763-1-alexander.levin@verizon.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/locking/rtmutex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 4312353..7806989 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1661,7 +1661,8 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name,
lock->waiters = RB_ROOT;
lock->waiters_leftmost = NULL;
- debug_rt_mutex_init(lock, name, key);
+ if (name && key)
+ debug_rt_mutex_init(lock, name, key);
}
EXPORT_SYMBOL_GPL(__rt_mutex_init);
prev parent reply other threads:[~2017-06-20 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-18 14:06 [PATCH] rt_mutex: don't " Levin, Alexander (Sasha Levin)
2017-06-20 13:19 ` tip-bot for Levin, Alexander (Sasha Levin) [this message]
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=tip-cde50a67397c0da7d11795d4b4418384022ab8e6@git.kernel.org \
--to=tipbot@zytor.com \
--cc=alexander.levin@verizon.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome