diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-06-21 14:12:38 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-06-30 15:47:18 +0300 |
commit | ca2acbd5483ff03a1c1ea0268d7a4acf0b3a13ee (patch) | |
tree | 1a3356904c185a7c04c5390908d9801846b3f42d /lib | |
parent | 59aa5c91f86336b9bfdb10c1ab23fb08bb291e53 (diff) | |
download | linux-ca2acbd5483ff03a1c1ea0268d7a4acf0b3a13ee.tar.xz |
locking/lockdep: Improve noinstr vs errors
[ Upstream commit 49faa77759b211fff344898edc23bb780707fff5 ]
Better handle the failure paths.
vmlinux.o: warning: objtool: debug_locks_off()+0x23: call to console_verbose() leaves .noinstr.text section
vmlinux.o: warning: objtool: debug_locks_off()+0x19: call to __kasan_check_write() leaves .noinstr.text section
debug_locks_off+0x19/0x40:
instrument_atomic_write at include/linux/instrumented.h:86
(inlined by) __debug_locks_off at include/linux/debug_locks.h:17
(inlined by) debug_locks_off at lib/debug_locks.c:41
Fixes: 6eebad1ad303 ("lockdep: __always_inline more for noinstr")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210621120120.784404944@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/debug_locks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/debug_locks.c b/lib/debug_locks.c index 06d3135bd184..a75ee30b77cb 100644 --- a/lib/debug_locks.c +++ b/lib/debug_locks.c @@ -36,7 +36,7 @@ EXPORT_SYMBOL_GPL(debug_locks_silent); /* * Generic 'turn off all lock debugging' function: */ -noinstr int debug_locks_off(void) +int debug_locks_off(void) { if (debug_locks && __debug_locks_off()) { if (!debug_locks_silent) { |