From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2D9E3AD53C; Mon, 23 Mar 2026 14:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774275012; cv=none; b=XxhG/nMYERsl0f3eYqeP6X1pSmXq2ElJTnBeAP7wYGQQWmRzfKt3BzFVf0l10iwOMHdgNFs2ICWtp33Qqe6iYFZP7CqQ7dDDaWraxQ+EvxcUcCrgENJ6NKBexSS/jM2z0YvbGJCxb/P9EBneDv+FYhIT5civfMHWZt9Mv4ebZuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774275012; c=relaxed/simple; bh=rnUWYyReqpmyprWjJiXXLl19KcUFJAjrhOO6GkrOmCw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b7hhRifzlzvlbz+HpCwL6e/cEsTptt3d0kEHd8UNMhPYuSyT47cYRGCiQaegCJM0mzG71bpslHjmPdEJucA0J0ekCetb1QAnCcieNrMqqZEdDey0xiGpRLjdvm/EubEluYB3QA+Zy7pAdSzKLpdkJDpwn1470zEayM5npiR6ydY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lpKNaaoM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lpKNaaoM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26565C4CEF7; Mon, 23 Mar 2026 14:10:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774275012; bh=rnUWYyReqpmyprWjJiXXLl19KcUFJAjrhOO6GkrOmCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lpKNaaoMlJq6p62hZw97DYgKMxyzCGEvD1jlE1taEHXtI6WhTCLaluISZnQyfqcyg YyFhi/d3N8GKyueMK1LaefCz2J34dVMaf7SLEXMInfVeeHOLp74SHj6smmgYE/uQ2r VBpk1CvFwqD25VyEN84fFDGgPprBX1z0uAvlYH9E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kyle Meyer , "Borislav Petkov (AMD)" , Steve Wahl Subject: [PATCH 6.18 193/212] x86/platform/uv: Handle deconfigured sockets Date: Mon, 23 Mar 2026 14:46:54 +0100 Message-ID: <20260323134509.827210610@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134503.770111826@linuxfoundation.org> References: <20260323134503.770111826@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kyle Meyer commit 1f6aa5bbf1d0f81a8a2aafc16136e7dd9a609ff3 upstream. 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") Signed-off-by: Kyle Meyer Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Steve Wahl Cc: stable@vger.kernel.org Link: https://patch.msgid.link/ab2BmGL0ehVkkjKk@hpe.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/apic/x2apic_uv_x.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) --- 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(vo 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)