lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 16 May 2024 17:17:01 +0800
From: Yajun Deng <yajun.deng@...ux.dev>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Yajun Deng <yajun.deng@...ux.dev>
Subject: [PATCH] mm/cma: get nid from physical address

The nid passed to cma_declare_contiguous_nid() may be NUMA_NO_NODE,
which is not the actual nid. To get the correct nid, we can get the nid
from physical address.

Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
---
 mm/cma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/cma.c b/mm/cma.c
index 3e9724716bad..be6cdde32944 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -361,6 +361,7 @@ int __init cma_declare_contiguous_nid(phys_addr_t base,
 		kmemleak_ignore_phys(addr);
 		base = addr;
 	}
+	nid = early_pfn_to_nid(PHYS_PFN(base));
 
 	ret = cma_init_reserved_mem(base, size, order_per_bit, name, res_cma);
 	if (ret)
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ