1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-26 18:43:33 -05:00
linux/drivers/cxl
Ben Widawsky 3d135db510 cxl/core: Move memdev management to core
The motivation for moving cxl_memdev allocation to the core (beyond
better file organization of sysfs attributes in core/ and drivers in
cxl/), is that device lifetime is longer than module lifetime. The cxl_pci
module should be free to come and go without needing to coordinate with
devices that need the text associated with cxl_memdev_release() to stay
resident. The move fixes a use after free bug when looping driver
load / unload with CONFIG_DEBUG_KOBJECT_RELEASE=y.

Another motivation for disconnecting cxl_memdev creation from cxl_pci is
to enable other drivers, like a unit test driver, to registers memdevs.

Fixes: b39cb1052a ("cxl/mem: Register CXL memX devices")
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/162792540495.368511.9748638751088219595.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2021-08-06 08:22:54 -07:00
..
core cxl/core: Move memdev management to core 2021-08-06 08:22:54 -07:00
acpi.c cxl/acpi: Use the ACPI CFMWS to create static decoder objects 2021-06-17 17:35:43 -07:00
cxl.h cxl/pmem: Register 'pmem' / cxl_nvdimm devices 2021-06-15 16:47:34 -07:00
cxlmem.h cxl/core: Move memdev management to core 2021-08-06 08:22:54 -07:00
Kconfig cxl/pmem: Add initial infrastructure for pmem support 2021-06-15 16:47:14 -07:00
Makefile cxl: Move cxl_core to new directory 2021-08-06 08:22:53 -07:00
pci.c cxl/core: Move memdev management to core 2021-08-06 08:22:54 -07:00
pci.h cxl/pci: Rename CXL REGLOC ID 2021-06-17 17:37:18 -07:00
pmem.c cxl: Move cxl_core to new directory 2021-08-06 08:22:53 -07:00