From nobody Mon Apr 6 16:46:15 2026 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13F69369225; Fri, 3 Apr 2026 19:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775243180; cv=none; b=PT84DJt2kDQg2Rw+uZqWfLST+PVkgVh5DGIZY2p7ZPfhzqBg6Cs+x/hrnoC4UbUoDDmHPkjeHesPN2mZh33hDOdyJs9ngYJzuSu1OzpA0764SqgYsJkcv2tmP+w5/IWIEm8rpfaxDKxafXfsmlatE3FzKnglpDzI4b9K8Wa5XEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775243180; c=relaxed/simple; bh=kQx2w6tjXS70FM6QN8ZD2XsXn3DcBvyYIGxSEVKnzeg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VNJRtOfuBwv3zInZg6F3nNofewdckRkYZ4notiZIyzcKLciqdT/2yKCWAAgpRhh5Yw6XDr4a+/0145WxqFMiVgN9EC7E4SyyHrQ/wlio+jRq8rQsH5juqcSy1tzwKZ+SKxvCIfcFl1rmt5YqUI6hTgBgIJCmvKp6lYfn1gkDwRg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=LZVrFFPo; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="LZVrFFPo" Received: by linux.microsoft.com (Postfix, from userid 1241) id CD7ED20B6F08; Fri, 3 Apr 2026 12:06:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CD7ED20B6F08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1775243178; bh=/2DAmCjc8SwftdIXiNdKNR+rhLn04r/3WgiKSyZp/C8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LZVrFFPoH2ZOMAfozYttxNb43tMnOShX418hsfi2bG8mpphlgaHaFh2HkyUnFs45/ 73G2v5UmNX0qoVoSFvBBodXuWFgAu4L6zfgC5C3fSSHuSUnN7A5u+uzgcqZ9Q3uHNS V9FVProCEZzsGcj43Z4FEeoMR4R2FX1PsbsirDZw= From: Jork Loeser To: linux-hyperv@vger.kernel.org Cc: x86@kernel.org, "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Arnd Bergmann , Michael Kelley , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Jork Loeser Subject: [PATCH v2 1/6] Drivers: hv: vmbus: fix hyperv_cpuhp_online variable shadowing Date: Fri, 3 Apr 2026 12:06:07 -0700 Message-ID: <20260403190613.47026-2-jloeser@linux.microsoft.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260403190613.47026-1-jloeser@linux.microsoft.com> References: <20260403190613.47026-1-jloeser@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" vmbus_alloc_synic_and_connect() declares a local 'int hyperv_cpuhp_online' that shadows the file-scope global of the same name. The cpuhp state returned by cpuhp_setup_state() is stored in the local, leaving the global at 0 (CPUHP_OFFLINE). When hv_kexec_handler() or hv_machine_shutdown() later call cpuhp_remove_state(hyperv_cpuhp_online) they pass 0, which hits the BUG_ON in __cpuhp_remove_state_cpuslocked(). Remove the local declaration so the cpuhp state is stored in the file-scope global where hv_kexec_handler() and hv_machine_shutdown() expect it. Fixes: 2647c96649ba ("Drivers: hv: Support establishing the confidential VM= Bus connection") Signed-off-by: Jork Loeser --- drivers/hv/vmbus_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 3e7a52918ce0..301273d61892 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1430,7 +1430,6 @@ static int vmbus_alloc_synic_and_connect(void) { int ret, cpu; struct work_struct __percpu *works; - int hyperv_cpuhp_online; =20 ret =3D hv_synic_alloc(); if (ret < 0) --=20 2.43.0