android_kernel_xiaomi_sm7250/kernel/locking
Waiman Long 0e0f7b3072 locking/lockdep: Add debug_locks check in __lock_downgrade()
commit 71492580571467fb7177aade19c18ce7486267f5 upstream.

Tetsuo Handa had reported he saw an incorrect "downgrading a read lock"
warning right after a previous lockdep warning. It is likely that the
previous warning turned off lock debugging causing the lockdep to have
inconsistency states leading to the lock downgrade warning.

Fix that by add a check for debug_locks at the beginning of
__lock_downgrade().

Debugged-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Reported-by: syzbot+53383ae265fb161ef488@syzkaller.appspotmail.com
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Link: https://lkml.kernel.org/r/1547093005-26085-1-git-send-email-longman@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27 14:14:43 +09:00
..
lockdep_internals.h
lockdep_proc.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
lockdep_states.h
lockdep.c locking/lockdep: Add debug_locks check in __lock_downgrade() 2019-03-27 14:14:43 +09:00
locktorture.c drm pull for 4.19-rc1 2018-08-15 17:39:07 -07:00
Makefile
mcs_spinlock.h locking/mcs: Use smp_cond_load_acquire() in MCS spin loop 2018-04-27 09:48:49 +02:00
mutex-debug.c
mutex-debug.h
mutex.c locking/mutex: Fix mutex debug call and ww_mutex documentation 2018-09-10 10:05:10 +02:00
mutex.h
osq_lock.c
percpu-rwsem.c
qrwlock.c
qspinlock_paravirt.h locking/qspinlock: Remove duplicate clear_pending() function from PV code 2018-04-27 12:55:22 +02:00
qspinlock_stat.h locking/qspinlock: Add stat tracking for pending vs. slowpath 2018-04-27 09:48:53 +02:00
qspinlock.c locking/qspinlock, x86: Provide liveness guarantee 2018-12-21 14:15:12 +01:00
rtmutex_common.h locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter() 2018-03-28 23:01:30 +02:00
rtmutex-debug.c
rtmutex-debug.h
rtmutex.c futex: Handle early deadlock return correctly 2019-02-12 19:47:24 +01:00
rtmutex.h
rwsem-spinlock.c
rwsem-xadd.c locking/rwsem: Fix (possible) missed wakeup 2019-03-05 17:58:49 +01:00
rwsem.c locking/rwsem: Fix up_read_non_owner() warning with DEBUG_RWSEMS 2018-06-20 11:29:23 +02:00
rwsem.h locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag 2018-05-16 11:45:15 +02:00
semaphore.c
spinlock_debug.c
spinlock.c
test-ww_mutex.c locking/ww_mutex: Fix runtime warning in the WW mutex selftest 2018-10-03 08:56:31 +02:00