]> git.baikalelectronics.ru Git - kernel.git/commit
lockdep: Fix nr_unused_locks accounting
authorPeter Zijlstra <peterz@infradead.org>
Tue, 27 Oct 2020 12:48:34 +0000 (13:48 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 30 Oct 2020 16:07:18 +0000 (17:07 +0100)
commit383d5dc64bdacc8e178971d4443d67eebf254b51
tree54c08eab491b2b6ded61b910db833389ff6a4679
parentb33c79736a72daaac365414bd871a6cc21c071f7
lockdep: Fix nr_unused_locks accounting

Chris reported that commit 24d5a3bffef1 ("lockdep: Fix
usage_traceoverflow") breaks the nr_unused_locks validation code
triggered by /proc/lockdep_stats.

By fully splitting LOCK_USED and LOCK_USED_READ it becomes a bad
indicator for accounting nr_unused_locks; simplyfy by using any first
bit.

Fixes: 24d5a3bffef1 ("lockdep: Fix usage_traceoverflow")
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://lkml.kernel.org/r/20201027124834.GL2628@hirez.programming.kicks-ass.net
kernel/locking/lockdep.c