Re: [tip: locking/core] lockdep: Fix usage_traceoverflow

Peter Zijlstra
2020-10-27T12:00:08Z

On Tue, Oct 27, 2020 at 11:29:35AM +0000, Chris Wilson wrote:
> Quoting tip-bot2 for Peter Zijlstra (2020-10-07 17:20:13)
> > The following commit has been merged into the locking/core branch of tip:
> >
> > Commit-ID: 24d5a3bffef117ed90685f285c6c9d2faa3a02b4
> > Gitweb: https://git.kernel.org/tip/24d5a3bffef117ed90685f285c6c9d2faa3a02b4
> > Author: Peter Zijlstra <peterz@infradead.org>
> > AuthorDate: Wed, 30 Sep 2020 11:49:37 +02:00
> > Committer: Peter Zijlstra <peterz@infradead.org>
> > CommitterDate: Wed, 07 Oct 2020 18:14:17 +02:00
> >
> > lockdep: Fix usage_traceoverflow
> >
> > Basically print_lock_class_header()'s for loop is out of sync with the
> > the size of of ->usage_traces[].
>
> We're hitting a problem,
>
> $ cat /proc/lockdep_stats
>
> upon boot generates:
>
> [ 29.465702] DEBUG_LOCKS_WARN_ON(debug_atomic_read(nr_unused_locks) != nr_unused)
> [ 29.465716] WARNING: CPU: 0 PID: 488 at kernel/locking/lockdep_proc.c:256 lockdep_stats_show+0xa33/0xac0
>
> that bisected to this patch. Only just completed the bisection and
> thought you would like a heads up.

Oh hey, that's 'curious'... it does indeed trivially reproduce, let me
have a poke.