Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540571

[PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off

From Boris Ostrovsky <boris.ostrovsky@oracle.com>
Newsgroups linux.kernel
Subject [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off
Date 2016-12-12 20:40 +0100
Message-ID <sNEC5-8kr-5@gated-at.bofh.it> (permalink)
References <sNEC5-8kr-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Otherwise we may unexpectedly reference a non-zero node via, for example,
acpi_get_node() while other parts of the kernel assume that only node 0
(which is what NUMA_NO_NODE is supposed to be converted to) is
available.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 drivers/acpi/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index ce3a7a1..edb0c79 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -70,7 +70,7 @@ int acpi_map_pxm_to_node(int pxm)
 {
 	int node;
 
-	if (pxm < 0 || pxm >= MAX_PXM_DOMAINS)
+	if (pxm < 0 || pxm >= MAX_PXM_DOMAINS || numa_off)
 		return NUMA_NO_NODE;
 
 	node = pxm_to_node_map[pxm];
-- 
1.8.3.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-12 20:40 +0100

csiph-web