diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2020-08-07 09:42:20 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-08-26 12:42:02 +0200 |
commit | e918188611f073063415f40fae568fa4d86d9044 (patch) | |
tree | 360f04ba1aeae14a4205a2b74ce0f5090bf70378 /kernel/locking/qspinlock_stat.h | |
parent | Documentation/locking/locktypes: Fix local_locks documentation (diff) | |
download | linux-e918188611f073063415f40fae568fa4d86d9044.tar.xz linux-e918188611f073063415f40fae568fa4d86d9044.zip |
locking: More accurate annotations for read_lock()
On the archs using QUEUED_RWLOCKS, read_lock() is not always a recursive
read lock, actually it's only recursive if in_interrupt() is true. So
change the annotation accordingly to catch more deadlocks.
Note we used to treat read_lock() as pure recursive read locks in
lib/locking-seftest.c, and this is useful, especially for the lockdep
development selftest, so we keep this via a variable to force switching
lock annotation for read_lock().
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200807074238.1632519-2-boqun.feng@gmail.com
Diffstat (limited to 'kernel/locking/qspinlock_stat.h')
0 files changed, 0 insertions, 0 deletions