From nobody Tue Feb 10 05:09:45 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F06F32E7186 for ; Mon, 12 Jan 2026 15:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768231021; cv=none; b=JrO+QbJIX44mE1CqcLtFdAbi24Psrx5J6R1XLpQjARRJy3mXBosbHwr0WCH2OFP8Zk7PvImX/ftSf3b+ejPAqfJZk+LoLbXQMNmWmxW7+Trx16wp9VU8xc2Qxo00jb4WYLyRGURCr3WAFSBBXnBNPYf6A/I/jeXJaK2ECCSzYfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768231021; c=relaxed/simple; bh=Z5H1PGWHvYiSsArxVxZSAYKBZ/Qk8SWJ5dU3IfJYlXw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dMUGE+hiR80UGkddgCfEb8zyfESz5f07s+353hSdKQgh7nXnndTLTQrHoFvr+FTeJpxYZynWKXEC7dZdiFqUCudgPZi9QwghlKGUwetPk56tzPiGX3/RMm97eKS8l0mnvbltdBfV1YtMmKyJdCcBNJoVHn64pYrEnM0otSPztF8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=viR1PWyE; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=MHNqA7Sl; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="viR1PWyE"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="MHNqA7Sl" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 553755BCC4; Mon, 12 Jan 2026 15:16:57 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1768231017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KrA6Fyw2WVDJmDZKCXu6ahFK/Dsl+EjYPaRIRf6Zix8=; b=viR1PWyEA3I2y9RBXkTHUFEdpybyaimIOGmmoaxT+5c74ln3o4M8CIADqr7dNs2s49/DLO rPIVypmdFCv2XbYStysO7Jz+I3q4wyUVkS4zBt/ymQB0JlM5oLxS9zyV5FlLpZzy5IB4Oi haoSlZYqaECrVY5rank+ctV3Cg5R7rA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1768231017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KrA6Fyw2WVDJmDZKCXu6ahFK/Dsl+EjYPaRIRf6Zix8=; b=MHNqA7SljFEDHwgBsaHY/qfV2Os1q2qRfud6yxlSlQ5GZCDMqxMDwoEIe0a8RME/vzZrpB Bew+4AuS4w5NxrCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 306713EA65; Mon, 12 Jan 2026 15:16:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id oEhwC2kQZWn7FgAAD6G6ig (envelope-from ); Mon, 12 Jan 2026 15:16:57 +0000 From: Vlastimil Babka Date: Mon, 12 Jan 2026 16:16:55 +0100 Subject: [PATCH RFC v2 01/20] mm/slab: add rcu_barrier() to kvfree_rcu_barrier_on_cache() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260112-sheaves-for-all-v2-1-98225cfb50cf@suse.cz> References: <20260112-sheaves-for-all-v2-0-98225cfb50cf@suse.cz> In-Reply-To: <20260112-sheaves-for-all-v2-0-98225cfb50cf@suse.cz> To: Harry Yoo , Petr Tesarik , Christoph Lameter , David Rientjes , Roman Gushchin Cc: Hao Li , Andrew Morton , Uladzislau Rezki , "Liam R. Howlett" , Suren Baghdasaryan , Sebastian Andrzej Siewior , Alexei Starovoitov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev, bpf@vger.kernel.org, kasan-dev@googlegroups.com, Vlastimil Babka , kernel test robot , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 553755BCC4 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Level: After we submit the rcu_free sheaves to call_rcu() we need to make sure the rcu callbacks complete. kvfree_rcu_barrier() does that via flush_all_rcu_sheaves() but kvfree_rcu_barrier_on_cache() doesn't. Fix that. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202601121442.c530bed3-lkp@intel.com Fixes: 0f35040de593 ("mm/slab: introduce kvfree_rcu_barrier_on_cache() for = cache destruction") Cc: stable@vger.kernel.org Signed-off-by: Vlastimil Babka Reviewed-by: Harry Yoo Reviewed-by: Suren Baghdasaryan Tested-by: Harry Yoo --- mm/slab_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index eed7ea556cb1..ee994ec7f251 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -2133,8 +2133,11 @@ EXPORT_SYMBOL_GPL(kvfree_rcu_barrier); */ void kvfree_rcu_barrier_on_cache(struct kmem_cache *s) { - if (s->cpu_sheaves) + if (s->cpu_sheaves) { flush_rcu_sheaves_on_cache(s); + rcu_barrier(); + } + /* * TODO: Introduce a version of __kvfree_rcu_barrier() that works * on a specific slab cache. --=20 2.52.0