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]
Message-Id: <20250207055213.141890-1-liuye@kylinos.cn>
Date: Fri,  7 Feb 2025 13:52:13 +0800
From: Liu Ye <liuye@...inos.cn>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Liu Ye <liuye@...inos.cn>
Subject: [PATCH] mm/mempool: Use kmalloc_array_node to replace kmalloc_array

The kmalloc_array call could be replaced with kmalloc_array_node
to allocate memory on a specific NUMA node.

Signed-off-by: Liu Ye <liuye@...inos.cn>
---
 mm/mempool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mempool.c b/mm/mempool.c
index 3223337135d0..51eabcc87177 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -328,8 +328,8 @@ int mempool_resize(mempool_t *pool, int new_min_nr)
 	spin_unlock_irqrestore(&pool->lock, flags);
 
 	/* Grow the pool */
-	new_elements = kmalloc_array(new_min_nr, sizeof(*new_elements),
-				     GFP_KERNEL);
+	new_elements = kmalloc_array_node(new_min_nr, sizeof(*new_elements),
+				     GFP_KERNEL, NUMA_NO_NODE);
 	if (!new_elements)
 		return -ENOMEM;
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ