From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
x86@kernel.org, Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off
Date: Mon, 12 Dec 2016 14:29:53 -0500 [thread overview]
Message-ID: <1481570993-13941-2-git-send-email-boris.ostrovsky@oracle.com> (raw)
In-Reply-To: <1481570993-13941-1-git-send-email-boris.ostrovsky@oracle.com>
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
next prev parent reply other threads:[~2016-12-12 19:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 19:29 [PATCH] x86/acpi: Use proper macro for invalid node Boris Ostrovsky
2016-12-12 19:29 ` Boris Ostrovsky [this message]
2016-12-13 0:11 ` [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off kbuild test robot
2016-12-15 11:52 ` [tip:x86/urgent] x86/acpi: Use proper macro for invalid node tip-bot for Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481570993-13941-2-git-send-email-boris.ostrovsky@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®