On Fri, May 08, 2026 at 03:17:29PM -0700, Andrew Morton wrote:
> On Wed, 06 May 2026 05:58:23 -0700 Breno Leitao <[email protected]> wrote:
> 
> > In this version, I am not touching the kernel code, but, just fixing
> > the selftest, as sashiko reported some issues, and I am addressing them
> > in here.
> > 
> > https://sashiko.dev/#/patchset/20260424-kmemleak_dedup-v2-0-8bea649b2a92%40debian.org
> > 
> > NOTE: Additional testing has revealed that lockdep detects a potential lock
> > inversion issue on kmemleak and legacy console.
> > 
> > The problem occurs because the function holds &object->lock (a raw spinlock)
> > while invoking printk to report the leak. This printk requires the legacy
> > console_owner lock, which remains in active use despite the ongoing 
> > transition
> > to the nbcon framework.
> > 
> > Concurrently, console drivers such as hvc (hypervisor virtual console) 
> > acquire
> > the console_owner lock and may subsequently free memory. This kfree() 
> > operation
> > calls into kmemleak's __delete_object(), which in turn acquires 
> > object->lock.
> > 
> > Although these code paths hold locks from different object instances, 
> > lockdep
> > operates on lock classes rather than individual instances. Since all
> > kmemleak_object->lock instances belong to the same lock class, lockdep
> > identifies this as a circular dependency, even though the actual deadlock
> > scenario cannot occur in practice (?!).
> > 
> > This problem was not introduced by this patchset/selftest, but, it is 
> > exposing
> > it. I plan to solve it once this patchset is done.
> 
> None of the above is usable for a [0/N] - it all pertains to the
> ongoing development process and should formally be below the ^---$
> separator.  Because it isn't relevant to the permanent kernel record.
> 
> The v2 series had a nice cover letter, so I stole that.  Please check
> that the below remains the truth, the whole truth, etc.

Ack, That remains correct.

I just updated the cover letter to reflect the changes, but in the
future I will keep the overall goal of the patchset.

Reply via email to