* [PATCH] x86/platform/uv: Handle deconfigured sockets
@ 2026-03-10 22:49 Kyle Meyer
2026-03-16 16:50 ` Steve Wahl
2026-03-20 15:42 ` Borislav Petkov
0 siblings, 2 replies; 4+ messages in thread
From: Kyle Meyer @ 2026-03-10 22:49 UTC (permalink / raw)
To: bp, dave.hansen, mingo, steve.wahl, tglx
Cc: dimitri.sivanich, hpa, justin.ernst, kyle.meyer, russ.anderson,
x86, linux-kernel
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.
Signed-off-by: Kyle Meyer <kyle.meyer@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..daf9853f7868 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 == (int)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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/platform/uv: Handle deconfigured sockets
2026-03-10 22:49 [PATCH] x86/platform/uv: Handle deconfigured sockets Kyle Meyer
@ 2026-03-16 16:50 ` Steve Wahl
2026-03-20 15:42 ` Borislav Petkov
1 sibling, 0 replies; 4+ messages in thread
From: Steve Wahl @ 2026-03-16 16:50 UTC (permalink / raw)
To: Kyle Meyer
Cc: bp, dave.hansen, mingo, steve.wahl, tglx, dimitri.sivanich, hpa,
justin.ernst, russ.anderson, x86, linux-kernel
On Tue, Mar 10, 2026 at 05:49:57PM -0500, Kyle Meyer wrote:
> 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.
>
> Signed-off-by: Kyle Meyer <kyle.meyer@hpe.com>
Reviewed-by: Steve Wahl <steve.wahl@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..daf9853f7868 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 == (int)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
>
--
Steve Wahl, Hewlett Packard Enterprise
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/platform/uv: Handle deconfigured sockets
2026-03-10 22:49 [PATCH] x86/platform/uv: Handle deconfigured sockets Kyle Meyer
2026-03-16 16:50 ` Steve Wahl
@ 2026-03-20 15:42 ` Borislav Petkov
2026-03-20 15:57 ` Kyle Meyer
1 sibling, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2026-03-20 15:42 UTC (permalink / raw)
To: Kyle Meyer
Cc: dave.hansen, mingo, steve.wahl, tglx, dimitri.sivanich, hpa,
justin.ernst, russ.anderson, x86, linux-kernel
On Tue, Mar 10, 2026 at 05:49:57PM -0500, Kyle Meyer wrote:
> When a socket is deconfigured, it's mapped to SOCK_EMPTY (0xffff). This
> causes a panic while allocating UV hub info structures.
This sounds like this needs to be CC:stable, have a Fixes: tag and so on, and
go in now?
Right?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/platform/uv: Handle deconfigured sockets
2026-03-20 15:42 ` Borislav Petkov
@ 2026-03-20 15:57 ` Kyle Meyer
0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2026-03-20 15:57 UTC (permalink / raw)
To: Borislav Petkov
Cc: dave.hansen, mingo, steve.wahl, tglx, dimitri.sivanich, hpa,
justin.ernst, russ.anderson, x86, linux-kernel
On Fri, Mar 20, 2026 at 04:42:32PM +0100, Borislav Petkov wrote:
> On Tue, Mar 10, 2026 at 05:49:57PM -0500, Kyle Meyer wrote:
> > When a socket is deconfigured, it's mapped to SOCK_EMPTY (0xffff). This
> > causes a panic while allocating UV hub info structures.
>
> This sounds like this needs to be CC:stable, have a Fixes: tag and so on, and
> go in now?
>
> Right?
Yes, thank you. I'll send a v2.
Thanks,
Kyle Meyer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-20 15:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 22:49 [PATCH] x86/platform/uv: Handle deconfigured sockets Kyle Meyer
2026-03-16 16:50 ` Steve Wahl
2026-03-20 15:42 ` Borislav Petkov
2026-03-20 15:57 ` Kyle Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox