linux/drivers/hv
Michael Kelley 14ae3003e7 Drivers: hv: Fix bad ref to hv_synic_eventring_tail when CPU goes offline
When a CPU goes offline, hv_common_cpu_die() frees the
hv_synic_eventring_tail memory for the CPU. But in a normal VM (i.e., not
running in the root partition) the per-CPU memory has not been allocated,
resulting in a bad memory reference and oops when computing the argument
to kfree().

Fix this by freeing the memory only when running in the root partition.

Fixes: 04df7ac399 ("Drivers: hv: Introduce per-cpu event ring tail")
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250421163134.2024-1-mhklinux@outlook.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250421163134.2024-1-mhklinux@outlook.com>
History 2025-04-25 21:13:53 +00:00
..
channel.c Drivers: hv: vmbus: Don't free ring buffers that couldn't be re-encrypted 2024-04-10 21:33:33 +00:00
channel_mgmt.c Drivers: hv: vmbus: Wait for boot-time offers during boot and resume 2025-01-10 00:54:21 +00:00
connection.c Drivers: hv: vmbus: Wait for boot-time offers during boot and resume 2025-01-10 00:54:21 +00:00
hv.c hyperv: Introduce hv_recommend_using_aeoi() 2025-03-20 21:23:04 +00:00
hv_balloon.c hv_balloon: update the NR_BALLOON_PAGES state 2025-03-21 22:03:13 -07:00
hv_common.c Drivers: hv: Fix bad ref to hv_synic_eventring_tail when CPU goes offline 2025-04-25 21:13:53 +00:00
hv_debugfs.c hv_debugfs: Make hv_debug_root static 2020-04-04 17:47:43 +01:00
hv_kvp.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
hv_proc.c Drivers: hv: Export some functions for use by root partition module 2025-03-20 21:23:04 +00:00
hv_snapshot.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
hv_trace.c hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace.h Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE 2021-04-18 13:03:11 +00:00
hv_trace_balloon.h hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
hv_util.c Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-09 18:44:15 +00:00
hv_utils_transport.c Drivers: hv: utils: Make use of the helper macro LIST_HEAD() 2022-02-09 14:33:21 +00:00
hv_utils_transport.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 280 2019-06-05 17:36:36 +02:00
hyperv_vmbus.h Drivers: hv: vmbus: Wait for boot-time offers during boot and resume 2025-01-10 00:54:21 +00:00
Kconfig Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
Makefile Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_common.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_eventfd.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_eventfd.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_irq.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_portid_table.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root_hv_call.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root_main.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_synic.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
ring_buffer.c Drivers: hv: vmbus: Remove second way of mapping ring buffers 2023-04-17 19:19:04 +00:00
vmbus_drv.c hyperv-next for 6.15 2025-03-25 14:47:04 -07:00