All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mm-commits@vger.kernel.org, kent.overstreet@linux.dev,
	catalin.marinas@arm.com, bigeasy@linutronix.de, arnd@arndb.de,
	leitao@debian.org
Subject: Re: + radix-tree-fix-kmemleak-false-positives-on-tree-head-reassignment.patch added to mm-new branch
Date: Sun, 5 Jul 2026 11:45:04 +0100	[thread overview]
Message-ID: <ako1sMPVu4dfQR4K@casper.infradead.org> (raw)
In-Reply-To: <20260705021240.79E101F000E9@smtp.kernel.org>

On Sat, Jul 04, 2026 at 07:12:40PM -0700, Andrew Morton wrote:
> The patch titled
>      Subject: radix-tree: fix kmemleak false positives on tree head reassignment
> has been added to the -mm mm-new branch.  Its filename is
>      radix-tree-fix-kmemleak-false-positives-on-tree-head-reassignment.patch

Umm.  I don't see this patch in my inbox anywhere else.  Is email broken
again?

> From: Breno Leitao <leitao@debian.org>
> Subject: radix-tree: fix kmemleak false positives on tree head reassignment
> Date: Fri, 03 Jul 2026 08:22:03 -0700
> 
> Kmemleak periodically reports transient false positives for radix tree
> nodes allocated through the IDR, for example:
> 
>   unreferenced object 0xffff0004d6ac4200 (size 576):
>     comm "tcpeventd", pid 6412
>     backtrace (crc 335d668a):
>       kmem_cache_alloc_noprof
>       radix_tree_node_alloc
>       radix_tree_extend
>       idr_get_free
>       idr_alloc_cyclic
>       map_create
>       __sys_bpf
> 
> radix_tree_extend() (grow) and radix_tree_shrink() (shrink) repoint
> root->xa_head to a new node.  If a kmemleak scan has already walked past
> root->xa_head, the new head is not reachable from any scanned pointer
> until the following scan, so kmemleak reports it as leaked even though it
> is live.
> 
> This is the same race fixed for the XArray API in commit a1a029bcea59

This commit ID doesn't exist in any tree I have.

> ("XArray: fix kmemleak false positive in xas_shrink()").  The IDR uses the
> radix tree API directly and hits it on both the grow and the shrink path,
> so mark the new head as a transient leak in both.
> 
> Add a matching kmemleak_transient_leak() stub to the radix tree test
> harness so the userspace lib/radix-tree.c build keeps building.

Last time this was proposed, the suggestion was that kmemleak needed to
be fixed.

https://lore.kernel.org/all/aCyI8T2sWlPLEYZ_@arm.com/

  reply	other threads:[~2026-07-05 10:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05  2:12 + radix-tree-fix-kmemleak-false-positives-on-tree-head-reassignment.patch added to mm-new branch Andrew Morton
2026-07-05 10:45 ` Matthew Wilcox [this message]
2026-07-05 18:15   ` Andrew Morton
2026-07-06 10:41   ` Breno Leitao
2026-07-06 11:39     ` Catalin Marinas
2026-07-06 14:53       ` Breno Leitao
2026-07-06 16:25         ` Catalin Marinas
2026-07-06 23:19           ` Catalin Marinas
2026-07-07 11:26             ` Breno Leitao
  -- strict thread matches above, loose matches on Subject: below --
2026-07-05  2:11 Andrew Morton
2026-07-02 22:42 Andrew Morton
2026-07-03 15:26 ` Breno Leitao

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=ako1sMPVu4dfQR4K@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=catalin.marinas@arm.com \
    --cc=kent.overstreet@linux.dev \
    --cc=leitao@debian.org \
    --cc=mm-commits@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.