Re: [PATCH v2 5/6] locking/lockdep: Decrement irq context counters when removing lock chain

Peter Zijlstra
2020-01-14T09:53:52Z

On Mon, Dec 16, 2019 at 10:15:16AM -0500, Waiman Long wrote:
> There are currently three counters to track the irq context of a lock
> chain - nr_hardirq_chains, nr_softirq_chains and nr_process_chains.
> They are incremented when a new lock chain is added, but they are
> not decremented when a lock chain is removed. That causes some of the
> statistic counts reported by /proc/lockdep_stats to be incorrect.
>
> Fix that by decrementing the right counter when a lock chain is removed.
>
> Fixes: a0b0fd53e1e6 ("locking/lockdep: Free lock classes that are no longer in use")
> Signed-off-by: Waiman Long <longman@redhat.com>

Fixes go at the start of a series, because if the depend on prior
patches (as this one does) we cannot apply them.