From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796323159; b=c89cDGmMB8YYTt3VMg1tRB7IwKvxm9fSMOQmQF+atn0UDvUrUGlvIvyyYeo85KnUma2s P5Q6Ej13XhDw7T7cwIkN+o7VWBmPYFge5LCXLdu12ZOgCa9EF8ObAVt1tZKMq6uUtSkaI 4hl2IZJleDaLvr+F1x+gjcQiMHvQ49NyokADHgE/95eZexbOeP5ACvpo/+MfO+qWuyhGi UwoLc0yQihaDo2tFwZOLisdwuKjZ2NO/HKro8SMAz3zDM41/xFh3nhyLDcEFw0lIbewS1 orGDg+pw9bKz9wIWC5NO4KfVlbois8c0U/d6l6BSkrXdA/V3A4IqVQCnM8GHlkjcCEQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796323159; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=i978qMOKnd5Hkl4xpS7ICOkOG8G5TuIl39D9H1mjnKI=; b=YOjeQ+ynBzl7JYFO5L1tNFLd7bDYcadNXVaIaohAD7HRLl+a15yjDNgw7fhtLAJdU7MH XClyTqMOGS2ADFtwEDNgvGWK/5SpF3xm4nm6EVwi05ehAAUUKn6R2Ft64Rh1CDUluLrYx nk3KxNy6qxIk6bw1+IvtBkQQ8OdFms0paA27CPkYF5M5ce1pecZKj867r5BTmZRyKIy6U ZrsagXEnnSjceQ2WIjD+10Si25Q1k2QgZUurPY6Bw6wbyjlfVtLbrbjQAyD+3tEKKHv+b bcXSF2fZqdhGVD/ydXmJ1fMB4hjsvPzE96TvNhS19LMOBd/4ib47DYO1Kg0+AzMqtLA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=LlNy5Ohy; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD413606A322 for ; Thu, 3 Dec 2026 18:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=LlNy5Ohy Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36CD21F00896; Thu, 3 Dec 2026 18:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796323159; bh=i978qMOKnd5Hkl4xpS7ICOkOG8G5TuIl39D9H1mjnKI=; h=Date:To:From:In-Reply-To:References:Subject; b=LlNy5OhyDqSAjcjNirr4xhkikRWCPUk1hcLMtrZvXt1SidBHixUi/6wCarDH4Lax4 ayP8p3KGKcj7cnU43Pbckd9Cv/6lNh5NWGPCOsOXRN3JBy59jgwCQfJNKtPyTpMxs+ dk4dwpr1pckwENmAFwdfri1B852svlSFBe3zlO4M= Date: Thu, 03 Dec 2026 10:39:18 -0800 To: mm-commits@vger.kernel.org,catalin.marinas@arm.com, tongweilin@linux.alibaba.com,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <149d93f2cfe20d355f4d9882ce2bf99030217772.1793871596.git.tongweilin@linux.alibaba.com> References: <149d93f2cfe20d355f4d9882ce2bf99030217772.1793871596.git.tongweilin@linux.alibaba.com> Subject: [alternative-merged] mm-kmemleak-serialize-disable-time-cleanup.patch removed from -mm tree Message-Id: <20261203183919.36CD21F00896@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The quilt patch titled Subject: mm: kmemleak: serialize disable-time cleanup has been removed from the -mm tree. Its filename was mm-kmemleak-serialize-disable-time-cleanup.patch This patch was dropped because an alternative patch was or shall be merged ------------------------------------------------------ From: Weilin Tong Subject: mm: kmemleak: serialize disable-time cleanup Date: Thu, 5 Nov 2026 17:52:49 +0800 kmemleak_do_cleanup() drops scan_mutex before removing tracked objects without kmemleak_lock. A concurrent clear command can therefore start another cleanup while the background cleanup is still running. Keep scan_mutex held until the background cleanup completes, serializing its lockless removals with explicit clearing and report readers. Link: https://patch.msgid.link/149d93f2cfe20d355f4d9882ce2bf99030217772.1793871596.git.tongweilin@linux.alibaba.com Fixes: 2abd839aa7e6 ("kmemleak: Do not corrupt the object_list during clean-up") Signed-off-by: Weilin Tong Signed-off-by: Andrew Morton Reviewed-by: Catalin Marinas mm/kmemleak.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/kmemleak.c~mm-kmemleak-serialize-disable-time-cleanup +++ a/mm/kmemleak.c @@ -2532,12 +2532,13 @@ static void kmemleak_do_cleanup(struct w * function. */ kmemleak_free_enabled = 0; - mutex_unlock(&scan_mutex); + /* Serialize the lockless cleanup with report readers. */ if (!kmemleak_found_leaks) __kmemleak_do_cleanup(); else pr_info("Kmemleak disabled without freeing internal data. Reclaim the memory with \"echo clear > /sys/kernel/debug/kmemleak\".\n"); + mutex_unlock(&scan_mutex); } static DECLARE_WORK(cleanup_work, kmemleak_do_cleanup); _ Patches currently in -mm which might be from tongweilin@linux.alibaba.com are tools-mm-thpmaps-fix-partial-thp-anon-file-accounting.patch tools-mm-thpmaps-fix-missing-order-1-file-thp-statistics.patch tools-mm-thpmaps-fix-missing-mapping-names.patch tools-mm-thpmaps-handle-carriage-returns-and-non-utf-8-filenames.patch