Skip to content

Commit 0afda3a

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
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: 4d00409 ("lockdep: Fix lockdep recursion") Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a1d5c98 commit 0afda3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/locking/lockdep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module_param(lock_stat, int, 0644);
7979
DEFINE_PER_CPU(unsigned int, lockdep_recursion);
8080
EXPORT_PER_CPU_SYMBOL_GPL(lockdep_recursion);
8181

82-
static inline bool lockdep_enabled(void)
82+
static __always_inline bool lockdep_enabled(void)
8383
{
8484
if (!debug_locks)
8585
return false;

0 commit comments

Comments
 (0)