alistair23-linux/kernel/locking
Boqun Feng d61fc96a37 lockdep: Avoid to modify chain keys in validate_chain()
Chris Wilson reported a problem spotted by check_chain_key(): a chain
key got changed in validate_chain() because we modify the ->read in
validate_chain() to skip checks for dependency adding, and ->read is
taken into calculation for chain key since commit f611e8cf98
("lockdep: Take read/write status in consideration when generate
chainkey").

Fix this by avoiding to modify ->read in validate_chain() based on two
facts: a) since we now support recursive read lock detection, there is
no need to skip checks for dependency adding for recursive readers, b)
since we have a), there is only one case left (nest_lock) where we want
to skip checks in validate_chain(), we simply remove the modification
for ->read and rely on the return value of check_deadlock() to skip the
dependency adding.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201102053743.450459-1-boqun.feng@gmail.com
2020-11-10 18:38:38 +01:00
..
lock_events.c
lock_events.h
lock_events_list.h
lockdep.c lockdep: Avoid to modify chain keys in validate_chain() 2020-11-10 18:38:38 +01:00
lockdep_internals.h lockdep: Fix usage_traceoverflow 2020-10-09 08:53:08 +02:00
lockdep_proc.c locking/lockdep: Fix overflow in presentation of average lock-time 2020-07-25 21:47:42 +02:00
lockdep_states.h
locktorture.c locktorture: Make function torture_percpu_rwsem_init() static 2020-08-24 18:45:32 -07:00
Makefile
mcs_spinlock.h
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
osq_lock.c locking/osq_lock: Annotate a data race in osq_lock 2020-06-29 12:04:48 -07:00
percpu-rwsem.c locking/percpu-rwsem: Use this_cpu_{inc,dec}() for read_count 2020-09-16 16:26:56 +02:00
qrwlock.c
qspinlock.c x86/kvm: Add "nopvspin" parameter to disable PV spinlocks 2020-07-08 16:21:57 -04:00
qspinlock_paravirt.h
qspinlock_stat.h
rtmutex-debug.c kernel: rename show_stack_loglvl() => show_stack() 2020-06-09 09:39:13 -07:00
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