Re: [PATCH] mm: kmemleak: confirm suspected leaks with a second scan
From: Andrew Morton
Date: Thu Jul 09 2026 - 23:13:11 EST
On Thu, 9 Jul 2026 18:24:47 +0100 Catalin Marinas <catalin.marinas@xxxxxxx> wrote:
> The kmemleak marking phase is not atomic. While the object graph is
> traversed, the kernel can modify pointers, free objects or allocate new
> ones. If a reference to an object is moved from one location to another,
> kmemleak scanning may miss it. We have explicit annotations like
> kmemleak_transient_leak() but identifying and maintaining them is not
> trivial.
>
> Given that such transient leaks are short-lived, rather than just
> reporting such objects as leaks, do another scan to confirm the
> suspected objects. If no new leaks are found during the first scan, skip
> the confirmation one.
All sort of build errors here due to other changes which are queued in
mm.git.
> BTW, I'll be away from Saturday for three weeks. I may reply
> occasionally but won't be able to test anything.
Have a great time - we'll be here when you get back.