From: Kyle Meyer <kyle.meyer@hpe.com>
To: bp@alien8.de, dave.hansen@linux.intel.com, mingo@redhat.com,
steve.wahl@hpe.com, tglx@kernel.org
Cc: dimitri.sivanich@hpe.com, hpa@zytor.com, justin.ernst@hpe.com,
kyle.meyer@hpe.com, russ.anderson@hpe.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2] x86/platform/uv: Handle deconfigured sockets
Date: Fri, 20 Mar 2026 12:19:20 -0500 [thread overview]
Message-ID: <ab2BmGL0ehVkkjKk@hpe.com> (raw)
When a socket is deconfigured, it's mapped to SOCK_EMPTY (0xffff). This
causes a panic while allocating UV hub info structures.
Fix this by using NUMA_NO_NODE, allowing UV hub info structures to be
allocated on valid nodes.
Fixes: 8a50c5851927 ("x86/platform/uv: UV support for sub-NUMA clustering")
Cc: stable@vger.kernel.org
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Signed-off-by: Kyle Meyer <kyle.meyer@hpe.com>
---
v1 -> v2: Add fixes tag and CC stable, as suggested by Boris.
v1: https://lore.kernel.org/all/abCgFYI9ezJgCGES@hpe.com
---
arch/x86/kernel/apic/x2apic_uv_x.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 15209f220e1f..42568ceec481 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -1708,8 +1708,22 @@ static void __init uv_system_init_hub(void)
struct uv_hub_info_s *new_hub;
/* Allocate & fill new per hub info list */
- new_hub = (bid == 0) ? &uv_hub_info_node0
- : kzalloc_node(bytes, GFP_KERNEL, uv_blade_to_node(bid));
+ if (bid == 0) {
+ new_hub = &uv_hub_info_node0;
+ } else {
+ int nid;
+
+ /*
+ * Deconfigured sockets are mapped to SOCK_EMPTY. Use
+ * NUMA_NO_NODE to allocate on a valid node.
+ */
+ nid = uv_blade_to_node(bid);
+ if (nid == SOCK_EMPTY)
+ nid = NUMA_NO_NODE;
+
+ new_hub = kzalloc_node(bytes, GFP_KERNEL, nid);
+ }
+
if (WARN_ON_ONCE(!new_hub)) {
/* do not kfree() bid 0, which is statically allocated */
while (--bid > 0)
--
2.43.0
next reply other threads:[~2026-03-20 17:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 17:19 Kyle Meyer [this message]
2026-03-20 19:31 ` [tip: x86/urgent] x86/platform/uv: Handle deconfigured sockets tip-bot2 for Kyle Meyer
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=ab2BmGL0ehVkkjKk@hpe.com \
--to=kyle.meyer@hpe.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dimitri.sivanich@hpe.com \
--cc=hpa@zytor.com \
--cc=justin.ernst@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=russ.anderson@hpe.com \
--cc=steve.wahl@hpe.com \
--cc=tglx@kernel.org \
--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