From: Imre Kaloz <kaloz@kernel.org>
To: Harry Yoo <harry@kernel.org>
Cc: Vlastimil Babka <vbabka@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Jann Horn <jannh@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] mm/slab: sample slab_state once in kmem_cache_destroy()
Date: Wed, 14 Oct 2026 17:21:41 +0200 (CEST) [thread overview]
Message-ID: <d1579925-2067-5a7d-8f30-fd56ccf89c26@kernel.org> (raw)
In-Reply-To: <as96u-sh8BbjXW24@thinkstation>
Hi Harry,
On Wed, 14 Oct 2026, Harry Yoo wrote:
<snip>
>> So it takes both. The read that hurts is the one at release time,
>> after rcu_barrier(); fixing only the double read keeps it, and so
>> does moving only the unlink check under the mutex. Reading once
>> right after the unlock didn't trigger it, but that is still racy,
>> just a much smaller window.
>
> Thanks for verifying that.
>
>> For stable, as far as I can tell the release-side read has been
>> outside slab_mutex since d50d82faa0c9 ("slub: fix failure when we
>> delete and create a slab cache") in v4.18
>
> For SLAB_TYPESAFE_BY_RCU caches, yes.
> and others since 0495e337b703.
>
> I think Fixes: d50d82faa0c9 should be fine.
>
>> , so that would cover
>> 5.10.y. The patch doesn't apply before 6.12, so the older branches
>> need their own backports.
>
> Ack.
> Are you willing to backport it to -stable kernels as well?
>
> And could you please post v2 with updated Fixes: and the
> commit message ;)
>
> Thanks for fixing this!
Sure thing. v2 is out:
https://lore.kernel.org/all/20261014150844.8536-1-kaloz@kernel.org/
I'll send the backports for 6.6, 6.1, 5.15 and 5.10 once it's in
mainline; 6.12 and later should take it as is.
Best,
Imre
prev parent reply other threads:[~2026-10-14 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 19:51 Imre Kaloz
2026-09-30 21:26 ` Jose A. Perez de Azpillaga
2026-10-01 14:22 ` Harry Yoo
2026-10-01 15:42 ` Imre Kaloz
2026-10-13 12:38 ` Harry Yoo
2026-10-13 12:51 ` Imre Kaloz
2026-10-13 14:29 ` Harry Yoo
2026-10-13 16:32 ` Imre Kaloz
2026-10-14 13:07 ` Harry Yoo
2026-10-14 15:21 ` Imre Kaloz [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=d1579925-2067-5a7d-8f30-fd56ccf89c26@kernel.org \
--to=kaloz@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=stable@vger.kernel.org \
--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
all inboxes | Powered by JetHome®