From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9287A343D8A; Wed, 8 Apr 2026 01:37:04 +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=1775612225; cv=none; b=B2qq92ysngSw9P2IXGXAP/1CaCi4nwnLE/QBRvTkEJhK3zvFZSwuvF7kZb3AoT6RYsc0EQE5dlw2i1poiSgSOKThRqjgegY59CCuohokh0PdAnTNOEbPI7YcwOJTJGhIXGoTX1k4O0mISBxItN5pJbB7zWvo1nidGZwLgAHytlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775612225; c=relaxed/simple; bh=obyKh64l9yrXn8gD04IWn9P9eLF+n7SG/27diORGajU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oSWQeydAZccr8ZigLZFnAunKcILP7G0AGJ0Q5jU3jSIppYgKAEMpoI1SwZTumrSKNl01DWTmcPhsYU+af7/FQx7tCtawbl1fa2AKDqk+zpY33Ud2G/K/sClFvlS2TkJuJXcQfLYuMeMKWFGRzg+FpxPC5G/ItPnUZhZ2ePUbZ5k= 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=ODqa9X7p; 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="ODqa9X7p" Received: by linux.microsoft.com (Postfix, from userid 1241) id 7F83F20B6F08; Tue, 7 Apr 2026 18:37:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7F83F20B6F08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1775612224; bh=GnfbMemLS2Nq7SuzpUuTcCtFJ3VZEYcGXdV/uwz4RYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ODqa9X7pSmJddXGEe96F9tdwarihCcaTGqdae+AqgyTZKnUeMDlzqIt84O817gCEK 1ivt0f03UemteE+XaBk5i8rEmz/KrqGrWiK+/Nkon2jelWn1yYEFuq2XMLydaODieh G+zkIPdsx67eegxES4Y44lAGe5S93qe+DABX/2QE= 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 v3 1/6] Drivers: hv: vmbus: fix hyperv_cpuhp_online variable shadowing Date: Tue, 7 Apr 2026 18:36:38 -0700 Message-ID: <20260408013645.286723-2-jloeser@linux.microsoft.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260408013645.286723-1-jloeser@linux.microsoft.com> References: <20260408013645.286723-1-jloeser@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 VMBus 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 3faa74e49a6b..5e7a6839c933 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1422,7 +1422,6 @@ static int vmbus_alloc_synic_and_connect(void) { int ret, cpu; struct work_struct __percpu *works; - int hyperv_cpuhp_online; ret = hv_synic_alloc(); if (ret < 0) -- 2.43.0