linux-stable/drivers/cxl
Dan Williams e6e17cc6ed cxl/core: Fix cxl_device_lock() class detection
If cxl_device_lock() is used on a non-CXL device the expectation is that
the lock class will fall back to CXL_ANON_LOCK. Instead it crashes when
trying to determine if the device is a 'decoder'. Specifically when the
device has a NULL type pointer. Just check for NULL before
de-referencing ->release.

Fixes: 3c5b903955 ("cxl: Prove CXL locking")
Reported-by: Ben Widawsky <ben.widawsky@intel.com>
Reviewed-by: Ben Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/164439225406.2941117.3927102269866914339.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-02-11 13:27:18 -08:00
..
core cxl/core: Fix cxl_device_lock() class detection 2022-02-11 13:27:18 -08:00
acpi.c cxl/core/port: Fix / relax decoder target enumeration 2022-02-08 23:15:10 -08:00
cxl.h cxl/core/port: Add endpoint decoders 2022-02-08 22:57:32 -08:00
cxlmem.h cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
cxlpci.h cxl/pci: Retrieve CXL DVSEC memory info 2022-02-08 22:57:31 -08:00
Kconfig cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
Makefile cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
mem.c cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
pci.c cxl/pci: Emit device serial number 2022-02-08 22:57:32 -08:00
pmem.c cxl: Prove CXL locking 2022-02-08 22:57:29 -08:00
port.c cxl/core/port: Add endpoint decoders 2022-02-08 22:57:32 -08:00