diff options
author | Levin, Alexander (Sasha Levin) <alexander.levin@verizon.com> | 2017-06-18 10:06:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-20 05:53:09 -0400 |
commit | cde50a67397c0da7d11795d4b4418384022ab8e6 (patch) | |
tree | 53ea73734b565a50df7901dde2cecd2d86720f3d | |
parent | 018956d6419be3e5ff5aacc60b2a3cff585adee1 (diff) |
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>
-rw-r--r-- | kernel/locking/rtmutex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 43123533e9b1..78069895032a 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, | |||
1661 | lock->waiters = RB_ROOT; | 1661 | lock->waiters = RB_ROOT; |
1662 | lock->waiters_leftmost = NULL; | 1662 | lock->waiters_leftmost = NULL; |
1663 | 1663 | ||
1664 | debug_rt_mutex_init(lock, name, key); | 1664 | if (name && key) |
1665 | debug_rt_mutex_init(lock, name, key); | ||
1665 | } | 1666 | } |
1666 | EXPORT_SYMBOL_GPL(__rt_mutex_init); | 1667 | EXPORT_SYMBOL_GPL(__rt_mutex_init); |
1667 | 1668 | ||