From: Breno Leitao <leitao@debian.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
"Liam R. Howlett" <liam@infradead.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH v3 0/2] mm/kmemleak: dedupe verbose scan output
Date: Mon, 11 May 2026 08:41:58 -0700 [thread overview]
Message-ID: <agH4girwVSEIMFAs@gmail.com> (raw)
In-Reply-To: <20260508151729.682551a2b2739e8b5d15ade2@linux-foundation.org>
On Fri, May 08, 2026 at 03:17:29PM -0700, Andrew Morton wrote:
> On Wed, 06 May 2026 05:58:23 -0700 Breno Leitao <leitao@debian.org> 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.
prev parent reply other threads:[~2026-05-11 15:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 12:58 [PATCH v3 0/2] mm/kmemleak: dedupe verbose scan output Breno Leitao
2026-05-06 12:58 ` [PATCH v3 1/2] mm/kmemleak: dedupe verbose scan output by allocation backtrace Breno Leitao
2026-05-06 12:58 ` [PATCH v3 2/2] selftests/mm: add kmemleak verbose dedup test Breno Leitao
2026-05-08 22:17 ` [PATCH v3 0/2] mm/kmemleak: dedupe verbose scan output Andrew Morton
2026-05-11 15:41 ` Breno Leitao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agH4girwVSEIMFAs@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=david@kernel.org \
--cc=kernel-team@meta.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox