linux-yocto/arch/x86/hyperv
Nuno Das Neves d72c97b616 x86/hyperv: Fix usage of cpu_online_mask to get valid cpu
[ Upstream commit bb169f80ed ]

Accessing cpu_online_mask here is problematic because the cpus read lock
is not held in this context.

However, cpu_online_mask isn't needed here since the effective affinity
mask is guaranteed to be valid in this callback. So, just use
cpumask_first() to get the cpu instead of ANDing it with cpus_online_mask
unnecessarily.

Fixes: e39397d1fd ("x86/hyperv: implement an MSI domain for root partition")
Reported-by: Michael Kelley <mhklinux@outlook.com>
Closes: https://lore.kernel.org/linux-hyperv/SN6PR02MB4157639630F8AD2D8FD8F52FD475A@SN6PR02MB4157.namprd02.prod.outlook.com/
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1751582677-30930-4-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1751582677-30930-4-git-send-email-nunodasneves@linux.microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-01 09:47:28 +01:00
..
hv_apic.c hyperv-next for v6.6 2023-09-04 11:26:29 -07:00
hv_init.c x86/hyperv: fix kexec crash due to VP assist page corruption 2024-09-18 19:24:07 +02:00
hv_proc.c drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status 2021-04-21 09:49:19 +00:00
hv_spinlock.c x86/apic: Wrap IPI calls into helper functions 2023-08-09 12:00:55 -07:00
hv_vtl.c x86/hyperv/vtl: Stop kernel from probing VTL0 low memory 2025-04-10 14:37:38 +02:00
irqdomain.c x86/hyperv: Fix usage of cpu_online_mask to get valid cpu 2025-08-01 09:47:28 +01:00
ivm.c x86/hyperv: Fix check of return value from snp_set_vmsa() 2025-04-10 14:37:41 +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