diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2021-06-21 13:12:38 +0200 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2021-06-30 08:46:55 -0400 |
| commit | a8faa6a1112c7408171c24a87b2b9e4aeb983514 (patch) | |
| tree | 4a6b61284734e2869154effc70b2346f7a38f157 /include | |
| parent | 16349865b7a517b3cdefd60db27fa73ad777676e (diff) | |
| download | linux-a8faa6a1112c7408171c24a87b2b9e4aeb983514.tar.gz linux-a8faa6a1112c7408171c24a87b2b9e4aeb983514.tar.bz2 linux-a8faa6a1112c7408171c24a87b2b9e4aeb983514.zip | |
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 'include')
| -rw-r--r-- | include/linux/debug_locks.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 2915f56ad421..edb5c186b0b7 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h @@ -27,8 +27,10 @@ extern int debug_locks_off(void); int __ret = 0; \ \ if (!oops_in_progress && unlikely(c)) { \ + instrumentation_begin(); \ if (debug_locks_off() && !debug_locks_silent) \ WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \ + instrumentation_end(); \ __ret = 1; \ } \ __ret; \ |
