Re: [PATCH v3] locking/ww_mutex: Adjust to lockdep nest_lock requirements

2024-10-21 Thread Thomas Hellström
On Thu, 2024-10-17 at 09:13 -0700, Boqun Feng wrote: > On Thu, Oct 17, 2024 at 05:10:07PM +0200, Thomas Hellström wrote: > > When using mutex_acquire_nest() with a nest_lock, lockdep refcounts > > the > > number of acquired lockdep_maps of mutexes of the same class, and > > also > > keeps a pointer

Re: [PATCH v3] locking/ww_mutex: Adjust to lockdep nest_lock requirements

2024-10-17 Thread Boqun Feng
On Thu, Oct 17, 2024 at 05:10:07PM +0200, Thomas Hellström wrote: > When using mutex_acquire_nest() with a nest_lock, lockdep refcounts the > number of acquired lockdep_maps of mutexes of the same class, and also > keeps a pointer to the first acquired lockdep_map of a class. That pointer > is then

[PATCH v3] locking/ww_mutex: Adjust to lockdep nest_lock requirements

2024-10-17 Thread Thomas Hellström
When using mutex_acquire_nest() with a nest_lock, lockdep refcounts the number of acquired lockdep_maps of mutexes of the same class, and also keeps a pointer to the first acquired lockdep_map of a class. That pointer is then used for various comparison-, printing- and checking purposes, but there