summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-02-08 23:37:34 -0800
committerDan Williams <dan.j.williams@intel.com>2022-02-11 13:27:18 -0800
commite6e17cc6ed751072513fe16cb595ac09f6821a43 (patch)
treed94d207d79c449073235e4aa01f8cbdb7ccdb517 /fs
parent5c3c067b601bcbcd381214e3a40e666fda5f3d6f (diff)
downloadlinux-e6e17cc6ed751072513fe16cb595ac09f6821a43.tar.bz2
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: 3c5b90395525 ("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>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions