linux/drivers/cxl/core
Dan Williams 6723e58d6f cxl/hdm: Remove broken error path
[ Upstream commit 5d09c63f11 ]

Dan reports that cxl_decoder_commit() potentially leaks a hold of
cxl_dpa_rwsem. The potential error case is a "should not" happen
scenario, turn it into a "can not" happen scenario by adding the error
check to cxl_port_setup_targets() where other setting validation occurs.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: http://lore.kernel.org/r/63295673-5d63-4919-b851-3b06d48734c0@moroto.mountain
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Fixes: 176baefb2e ("cxl/hdm: Commit decoder state to hardware")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:31 +01:00
..
core.h cxl/memdev: Fix sanitize vs decoder setup locking 2023-11-20 11:59:30 +01:00
hdm.c cxl/hdm: Remove broken error path 2023-11-20 11:59:31 +01:00
Makefile cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
mbox.c cxl/memdev: Fix sanitize vs decoder setup locking 2023-11-20 11:59:30 +01:00
memdev.c cxl/mem: Fix shutdown order 2023-11-20 11:59:30 +01:00
pci.c Merge branch 'for-6.5/cxl-rch-eh' into for-6.5/cxl 2023-06-25 18:56:13 -07:00
pmem.c cxl/memdev: Formalize endpoint port linkage 2023-06-25 14:31:33 -07:00
pmu.c cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
port.c cxl/port: Fix @host confusion in cxl_dport_setup_regs() 2023-11-20 11:59:31 +01:00
region.c cxl/hdm: Remove broken error path 2023-11-20 11:59:31 +01:00
regs.c cxl/core/regs: Rename @dev to @host in struct cxl_register_map 2023-11-20 11:59:31 +01:00
suspend.c PM: CXL: Disable suspend 2022-04-22 16:09:42 -07:00
trace.c cxl/trace: Add an HPA to cxl_poison trace events 2023-04-23 11:46:13 -07:00
trace.h cxl/memdev: Trace inject and clear poison as cxl_poison events 2023-04-23 12:08:39 -07:00