linux/arch/x86/hyperv
Ethan Tidmore b5f50519bf x86/hyperv: Fix error pointer dereference
[ Upstream commit 705d01c8d7 ]

The function idle_thread_get() can return an error pointer and is not
checked for it. Add check for error pointer.

Detected by Smatch:
arch/x86/hyperv/hv_vtl.c:126 hv_vtl_bringup_vcpu() error:
'idle' dereferencing possible ERR_PTR()

Fixes: 2b4b90e053 ("x86/hyperv: Use per cpu initial stack for vtl context")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:45 -05:00
..
hv_apic.c x86/hyperv: Cosmetic changes for hv_apic.c 2024-03-22 23:38:24 +00:00
hv_init.c x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap() 2025-08-01 09:48:46 +01:00
hv_proc.c mshyperv: Introduce hv_numa_node_to_pxm_info() 2024-03-22 23:40:36 +00:00
hv_spinlock.c x86/hyperv: Cosmetic changes for hv_spinlock.c 2024-03-18 21:56:19 +00:00
hv_vtl.c x86/hyperv: Fix error pointer dereference 2026-03-04 07:20:45 -05:00
irqdomain.c x86/hyperv: Fix usage of cpu_online_mask to get valid cpu 2025-08-01 09:48:40 +01:00
ivm.c x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state() 2025-10-19 16:34:02 +02:00
Makefile x86/hyperv: VTL support for Hyper-V 2023-04-18 17:29:52 +00:00
mmu.c x86/hyperv: Improve code for referencing hyperv_pcpu_input_arg 2023-06-28 17:53:25 +00:00
nested.c x86/hyperv: Improve code for referencing hyperv_pcpu_input_arg 2023-06-28 17:53:25 +00:00