diff options
| author | Dan Williams <djbw@kernel.org> | 2026-05-20 00:01:54 +0300 |
|---|---|---|
| committer | Dave Jiang <dave.jiang@intel.com> | 2026-06-12 23:47:28 +0300 |
| commit | d91feb88692e81b00cd22f0125cfcd04970b4a0b (patch) | |
| tree | 724b08eb4f696b4049c22a44b34a2e15a84b51ad /include/uapi/linux/usb | |
| parent | e43ffb69e0438cddd72aaa30898b4dc446f664f8 (diff) | |
| download | linux-d91feb88692e81b00cd22f0125cfcd04970b4a0b.tar.xz | |
cxl/region: Block region delete during region creation
Expand the range lock, rename it "regions_lock", to disable region deletion
in the critical period between construct_region() and attach_target(), as
well as the period between device_add() and registering the remove actions.
Otherwise, userspace can confuse the kernel. It can violate the assumption
the region stays registered through the completion of cxl_add_to_region().
It can violate the assumption that devm_add_action_or_reset() is working
with a live 'struct cxl_region'.
It is ok for the region to disappear outside of those windows as that
mirrors device hotplug flows where the proper locks are held.
Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery")
Signed-off-by: Dan Williams <djbw@kernel.org>
Reviewed-by: Alejandro Lucero <alucerop@amd.com>
Tested-by: ALejandro Lucero <alucerop@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260519210158.1499795-2-djbw@kernel.org
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'include/uapi/linux/usb')
0 files changed, 0 insertions, 0 deletions
