From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (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 7E544140E5F for ; Tue, 10 Mar 2026 22:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.147.86 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773183033; cv=none; b=dRt+Xag8Iwlz7cRRqS9478TKHmy83YMpA64O7w9IVIKdC6aR00hcyYYIjYrijWz0e8Mvq27V81ezlHDqo48T1qAHn1byK4ySibCas/Kp3X9B4YYJRD0oHITkJniVtyLvJ7Y1zJROdW0rVjnCPCtt/iwPyelaW1GgQ94DA8F+LbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773183033; c=relaxed/simple; bh=ZJJV9nsrFwZMXq28P1RN1fLZ5WxEnsc3fSlSL76XEx0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=DWHdxTIaCwIjdi1k3tLvkAXqw5OrrLmlZsjTHJWZpqe34je4hgmg4J1+UKV3AYz14pb3kcb0f6hoJB9oNs89m07XKezqduu8e4jZ2AhQAL3mdlWD5fJT5yM/Jq+QxE27X8Q5mjWosUSRXfiGeOL/vD0v+jqJGCDGK78JpjI7/BI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=hpe.com; spf=pass smtp.mailfrom=hpe.com; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b=X2Kwc3t7; arc=none smtp.client-ip=148.163.147.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=hpe.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hpe.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b="X2Kwc3t7" Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62AMDNBZ3650621; Tue, 10 Mar 2026 22:50:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=cc :content-type:date:from:message-id:mime-version:subject:to; s= pps0720; bh=ytS21jv9mZ+FP/W6KQfHjMO8+1g64KZ29xl5BukHWgI=; b=X2Kw c3t7/S1oNXB+l9TcxUptmZZJNU4p6j3RDmEbagbydoijo07hzWq5ldtLwvM1g/AN 3Fxo0bWo8B1uY0uvi3UMN8XnLf4veqqMQDG0FsXhSQCAX/wsRZEi4/tsQm8iY5bE QQhXGknMmEV5rlfKp2QdKaGr8WKytimyyexsa6yXYwsn1SkoD9MJa7wQuHNGuye/ 8K0g4I9lOBFd8RP/ToEpMOiafff+3Rhj2DsZsiQ+zSA2Dldz2l4VkDON6e6SKhp4 CwncXOu8C+FFMUVASxag2GS1VZVGoVJCTxId5eXftLaFntwWUGF1EIUT/NU9KoSP V/aLnMz5QqM7qta7ZA== Received: from p1lg14880.it.hpe.com (p1lg14880.it.hpe.com [16.230.97.201]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 4ctuw5r9p4-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 10 Mar 2026 22:50:00 +0000 (GMT) Received: from p1lg14886.dc01.its.hpecorp.net (unknown [10.119.18.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14880.it.hpe.com (Postfix) with ESMTPS id 9C3DA801614; Tue, 10 Mar 2026 22:50:00 +0000 (UTC) Received: from HPE-5CG20646DK.localdomain (unknown [16.231.227.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTPS id 39B898100BC; Tue, 10 Mar 2026 22:49:58 +0000 (UTC) Date: Tue, 10 Mar 2026 17:49:57 -0500 From: Kyle Meyer 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] x86/platform/uv: Handle deconfigured sockets Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Proofpoint-GUID: J3QYf3PtEHz1ntAf2L-4auEARZ3IE02B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEwMDE5NSBTYWx0ZWRfXwkXICc3CWkT+ Pz4B6pLXXNaadVpqUs09keMdBem+B4ZgkclEaMfmxHMzMTufko6e2V33rg821Evl0Zd2va3l2Nk fkfdgGLcB+oe1dFd57vIhrpaXoR0oQlbyIMshWvU3siEz+IFsmXFkH8SjEm/ongQivlO72w/GyN TvhroLME7riuyi67oIEJKyvQTg/FqaQZ/JKWMIyfYtq5kxi0rd6Vfsn+qUyqziAYf0UXAPPrCxR BjlbhIthd0mEsfBze2bAmSO7eRS3nSHmME1XkJxL+a1QOhS5Ni9o+tpw6NvoA8Q+ZSubKKIlV4/ yEBxs7n/OtCylAL7yCsOe1faNZxkvimYXp5ychEzuQ0Uh6HEL0S5HfGauzzG5apzv/r8R+oI+Vi e2FEayU0PouphMH68yjh0HGazV5qjdgquqFTCNgMEVYiov5HOaoiNB3eYzzSXHcXiA6ZwGfxvfg pG3Yz7e+gQ/5rrHwbfA== X-Proofpoint-ORIG-GUID: J3QYf3PtEHz1ntAf2L-4auEARZ3IE02B X-Authority-Analysis: v=2.4 cv=M7ZA6iws c=1 sm=1 tr=0 ts=69b0a019 cx=c_pps a=A+SOMQ4XYIH4HgQ50p3F5Q==:117 a=A+SOMQ4XYIH4HgQ50p3F5Q==:17 a=kj9zAlcOel0A:10 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=gQcMVamqm3wCPoSYhaRC:22 a=ModqzXLkJJ0tFyq98apW:22 a=MvuuwTCpAAAA:8 a=MiJN9hvPIQiAcdar65kA:9 a=CjuIK1q_8ugA:10 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-10_04,2026-03-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603100195 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 --- 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