From: Greg Kroah-Hartman Date: Thu, 25 Apr 2019 08:00:43 +0000 (+0200) Subject: Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()" X-Git-Tag: v4.14.114~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=599c8a408f875477624384edd60ce0c821ff7c8a;p=thirdparty%2Fkernel%2Fstable.git Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()" This reverts commit 4a195a0bc2e954b91085d5c82eb20c51835ee7b0 which was commit 71492580571467fb7177aade19c18ce7486267f5 upstream. Tetsuo rightly points out that the backport here is incorrect, as it touches the __lock_set_class function instead of the intended __lock_downgrade function. Reported-by: Tetsuo Handa Cc: Waiman Long Cc: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: Ingo Molnar Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index e57be7031cb34..bf694c709b96f 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3650,9 +3650,6 @@ __lock_set_class(struct lockdep_map *lock, const char *name, unsigned int depth; int i; - if (unlikely(!debug_locks)) - return 0; - depth = curr->lockdep_depth; /* * This function is about (re)setting the class of a held lock,