diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-01-06 15:36:22 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-01-12 21:10:59 +0100 |
commit | 0afda3a888dccf12557b41ef42eee942327d122b (patch) | |
tree | a8ec61bd01d73b207dc9e9c8ab7d5f12fa79b405 /kernel/locking/lockdep.c | |
parent | a1d5c98aac33a5a0004ecf88905dcc261c52f988 (diff) | |
download | linux-0afda3a888dccf12557b41ef42eee942327d122b.tar.gz linux-0afda3a888dccf12557b41ef42eee942327d122b.tar.bz2 linux-0afda3a888dccf12557b41ef42eee942327d122b.zip |
locking/lockdep: Cure noinstr fail
When the compiler doesn't feel like inlining, it causes a noinstr
fail:
vmlinux.o: warning: objtool: lock_is_held_type()+0xb: call to lockdep_enabled() leaves .noinstr.text section
Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210106144017.592595176@infradead.org
Diffstat (limited to 'kernel/locking/lockdep.c')
-rw-r--r-- | kernel/locking/lockdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index c1418b47f625..02bc5b8f1eb2 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -79,7 +79,7 @@ module_param(lock_stat, int, 0644); DEFINE_PER_CPU(unsigned int, lockdep_recursion); EXPORT_PER_CPU_SYMBOL_GPL(lockdep_recursion); -static inline bool lockdep_enabled(void) +static __always_inline bool lockdep_enabled(void) { if (!debug_locks) return false; |