WSL2-Linux-Kernel/kernel/locking
Sebastian Andrzej Siewior 6c11c6e3d5 locking/mutex: Test for initialized mutex
An uninitialized/ zeroed mutex will go unnoticed because there is no
check for it. There is a magic check in the unlock's slowpath path which
might go unnoticed if the unlock happens in the fastpath.

Add a ->magic check early in the mutex_lock() and mutex_trylock() path.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190703092125.lsdf4gpsh2plhavb@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-07-25 15:39:27 +02:00
..
Makefile
lock_events.c
lock_events.h
lock_events_list.h
lockdep.c locking/lockdep: Clean up #ifdef checks 2019-07-25 15:39:26 +02:00
lockdep_internals.h locking/lockdep: increase size of counters for lockdep statistics 2019-06-25 10:17:08 +02:00
lockdep_proc.c locking/lockdep: Hide unused 'class' variable 2019-07-25 15:39:25 +02:00
lockdep_states.h
locktorture.c
mcs_spinlock.h
mutex-debug.c
mutex-debug.h
mutex.c locking/mutex: Test for initialized mutex 2019-07-25 15:39:27 +02:00
mutex.h
osq_lock.c
percpu-rwsem.c Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2019-06-28 19:46:47 +02:00
qrwlock.c
qspinlock.c
qspinlock_paravirt.h
qspinlock_stat.h
rtmutex-debug.c
rtmutex-debug.h
rtmutex.c docs: locking: convert docs to ReST and rename to *.rst 2019-07-15 08:53:27 -03:00
rtmutex.h
rtmutex_common.h
rwsem.c locking/rwsem: Add ACQUIRE comments 2019-07-25 15:39:25 +02:00
rwsem.h
semaphore.c
spinlock.c
spinlock_debug.c
test-ww_mutex.c