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=1796499519; b=W7GXF0gldmerJojHr+hfSExLLQxIQy3QYKxgO1jALVJtLbnvqWQgUwTnqV4qX829YHpq 5C92CrTx5IOuaoW8uuHVuYLvO42sKkpzoHs5Dly8hWIb+/1RwPMB4zffCL3OIpooJEVel J3RAVT2MMuDKBVyvYB3uOnW66Naafo4xgbRAZgnW72X3pU7jmsh57Im9OXqbPdHOoN6gy +KpQL8CGL3g337Mh8QMsrgJnP8yFOYfIDDGxfYg/YNsCeZYhgdxNzw6KrpNDv/C8Fbfys rWe/uERmy3UQOe6GRfBpKzKq9z5vhVBImw4GPA56IwOpGfLEufhdWFg6sdH7BRffA9w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796499519; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=I4g2Bv55RuepEaqjgnAYnh/Y6V7TnFnsRyr3spDXvgI=; b=o/iII0sdSB9KfyF07G0QuZxTi9hfLutub15B8VI5+43hfrqiG95GaGAMnimQxBSd5wOv KtaJ565AkTCuXyPqAfYSZkpwFZLVSlFvtaPyaMlsZy+CVPm0Ob2NTNKnMPbX0Fx8B+Xf3 5zX96UTxAK181M1T7tL8hQwoIXyJYGWRoQLHSWWkwt0qFi8idqQvWEmbAtg896FC9TYWP 142FPIa4m/o6vVU3BcAL2iRmY+y4frIHyK5c0QmvXly3xYS2ksuZU8KQpMuB/tX0Q7Z2H GYt2PCRAfQY1EQ2vdFpp5Q1ACQ0Q+aN89kcEYjgmlfrP2N9bpz93RoUB82CdtLaSD/A== 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="cqtTP/Mt"; 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 E0FDC606A31F for ; Sat, 5 Dec 2026 19:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=cqtTP/Mt Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3274B1F0092B; Sat, 5 Dec 2026 19:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796499518; bh=I4g2Bv55RuepEaqjgnAYnh/Y6V7TnFnsRyr3spDXvgI=; h=Date:To:From:In-Reply-To:References:Subject; b=cqtTP/Mtva6vTpN4+f6/kA0rX4jLGAmB3STvxvkQoppzj94udxD2Zkp+b9tNh+941 uIkz/pDwfqFv5ySIMh4xng6wzOsFuh4zYnSYbuDN/LpsNXspiE1VYPYeq0D+3C4S32 QyXS725H16l7PEj7lTb/5GlWydW2f0pwiMA6AuyU= Date: Sat, 05 Dec 2026 11:38:37 -0800 To: mm-commits@vger.kernel.org,joshua.hahnjy@gmail.com,ekffu200098@gmail.com, david@kernel.org,rppt@kernel.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261202164612.1573222-1-rppt@kernel.org> References: <20261202164612.1573222-1-rppt@kernel.org> Subject: [merged mm/memblock.git] mm-fake-numa-fix-leak-of-the-distance-table-copy-on-errors.patch removed from -mm tree Message-Id: <20261205193838.3274B1F0092B@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/fake-numa: fix leak of the distance table copy on errors has been removed from the -mm tree. Its filename was mm-fake-numa-fix-leak-of-the-distance-table-copy-on-errors.patch This patch was dropped because it was merged into mm/memblock.git ------------------------------------------------------ From: "Mike Rapoport (Microsoft)" Subject: mm/fake-numa: fix leak of the distance table copy on errors Date: Wed, 02 Dec 2026 18:46:11 +0200 numa_emulation() copies the physical distance table before calling fix_pxm_node_maps(), but if fix_pxm_node_maps() fails, the copy is never freed. This only happens with numa=fake= setups that fix_pxm_node_maps() already warns about, and leaks a single page on systems with up to 64 nodes. Free the copy at no_emu. memblock_free() ignores NULL, so this is safe for the errors that happen before the table is copied. Link: https://patch.msgid.link/20261202164612.1573222-1-rppt@kernel.org Fixes: 63db8170bf34 ("mm/fake-numa: allow later numa node hotplug") Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton Reported-by: Sashiko Closes: https://sashiko.dev/bug/linux-96a473a0-2815-4091-910e-970513fa6467 Reviewed-by: David Hildenbrand (Arm) Reviewed-by: Joshua Hahn Reviewed-by: Sang-Heon Jeon mm/numa_emulation.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/numa_emulation.c~mm-fake-numa-fix-leak-of-the-distance-table-copy-on-errors +++ a/mm/numa_emulation.c @@ -546,6 +546,7 @@ void __init numa_emulation(struct numa_m return; no_emu: + memblock_free(phys_dist, phys_size); numa_nodes_parsed = physnode_mask; /* No emulation. Build identity emu_nid_to_phys[] for numa_add_cpu() */ for (i = 0; i < ARRAY_SIZE(emu_nid_to_phys); i++) _ Patches currently in -mm which might be from rppt@kernel.org are mm-cma-simplify-cma_declare_contiguous_multi.patch mm-secretmem-disable-memfd_secret-if-secretmem_init-fails.patch mm-cma-fix-handling-of-free-ranges-that-cross-4g-for-multi-range-areas.patch userfaultfd-write-lock-the-vma-before-clearing-its-uffd-state.patch userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty.patch userfaultfd-mark-thps-moved-by-uffdio_move-soft-dirty.patch selftests-mm-free-the-test-context-when-uffd_test_ctx_init-fails.patch hibernation-make-swsusp_page-helpers-static.patch hibernation-ensure-secretmem-pages-dont-reach-a-snapshot.patch hibernate-handle-potential-errors-in-hibernate_mapunmap_page.patch hibernation-kfence-explicitly-map-unmap-kfence-pages.patch hibernation-make-hibernation-unavailable-when-debug_pagealloc-is-on.patch