linux/drivers/cxl
Li Ming 1b3ed6c512 cxl/hdm: Fix potential infinite loop in __cxl_dpa_reserve()
[ Upstream commit d4026a4462 ]

In __cxl_dpa_reserve(), it will check if the new resource range is
included in one of paritions of the cxl memory device.
cxlds->nr_paritions is used to represent how many partitions information
the cxl memory device has. In the loop, if driver cannot find a
partition including the new resource range, it will be an infinite loop.

[ dj: Removed incorrect fixes tag ]

Fixes: 991d98f17d ("cxl: Make cxl_dpa_alloc() DPA partition number agnostic")
Signed-off-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260112120526.530232-1-ming.li@zohomail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-23 11:21:17 +01:00
..
core cxl/hdm: Fix potential infinite loop in __cxl_dpa_reserve() 2026-01-23 11:21:17 +01:00
acpi.c cxl/acpi: Fix setup of memory resource in cxl_acpi_set_cache_size() 2025-10-14 12:59:13 -07:00
cxl.h Merge branch 'for-6.18/cxl-delay-dport' into cxl-for-next 2025-09-18 14:34:51 -07:00
cxlmem.h cxl/core: Add locked variants of the poison inject and clear funcs 2025-08-12 16:02:00 -07:00
cxlpci.h cxl/test: Refactor decoder setup to reduce cxl_test burden 2025-09-18 09:54:50 -07:00
Kconfig cxl/edac: Support for finding memory operation attributes from the current boot 2025-05-23 13:24:38 -07:00
Makefile cxl/port: Fix CXL port initialization order when the subsystem is built-in 2024-10-25 16:06:49 -05:00
mem.c cxl/edac: Add CXL memory device patrol scrub control feature 2025-05-23 13:24:09 -07:00
pci.c cxl/pci: Replace mutex_lock_io() w mutex_lock() for mailbox access 2025-06-30 16:36:06 -07:00
pmem.c cxl/pci: Drop the parameter is_port of cxl_gpf_get_dvsec() 2025-04-09 12:48:18 -07:00
pmu.h cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
port.c cxl: Defer dport allocation for switch ports 2025-09-18 09:55:22 -07:00
security.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00