OrangePi_CM5/kernel/locking
Sebastian Andrzej Siewior fb4a58f519 lockdep: Let lock_is_held_type() detect recursive read as read
[ Upstream commit 2507003a1d10917c9158077bf6030719d02c941e ]

lock_is_held_type(, 1) detects acquired read locks. It only recognized
locks acquired with lock_acquire_shared(). Read locks acquired with
lock_acquire_shared_recursive() are not recognized because a `2' is
stored as the read value.

Rework the check to additionally recognise lock's read value one and two
as a read held lock.

Fixes: e918188611 ("locking: More accurate annotations for read_lock()")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Acked-by: Waiman Long <longman@redhat.com>
Link: https://lkml.kernel.org/r/20210903084001.lblecrvz4esl4mrr@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:02 +01:00
..
Makefile
…
lock_events.c
…
lock_events.h
…
lock_events_list.h
…
lockdep.c lockdep: Let lock_is_held_type() detect recursive read as read 2021-11-18 14:04:02 +01:00
lockdep_internals.h
…
lockdep_proc.c
…
lockdep_states.h
…
locktorture.c
…
mcs_spinlock.h
…
mutex-debug.c locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal 2021-05-26 12:06:50 +02:00
mutex-debug.h locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal 2021-05-26 12:06:50 +02:00
mutex.c locking/mutex: Fix HANDOFF condition 2021-09-15 09:50:23 +02:00
mutex.h locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal 2021-05-26 12:06:50 +02:00
osq_lock.c
…
percpu-rwsem.c
…
qrwlock.c locking/qrwlock: Fix ordering in queued_write_lock_slowpath() 2021-04-28 13:40:00 +02:00
qspinlock.c
…
qspinlock_paravirt.h
…
qspinlock_stat.h
…
rtmutex-debug.c
…
rtmutex-debug.h
…
rtmutex.c
…
rtmutex.h
…
rtmutex_common.h
…
rwsem.c
…
rwsem.h
…
semaphore.c
…
spinlock.c
…
spinlock_debug.c
…
test-ww_mutex.c
…