summaryrefslogtreecommitdiff
path: root/drivers/phy/spacemit/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorDan Williams <djbw@kernel.org>2026-05-19 14:01:54 -0700
committerDave Jiang <dave.jiang@intel.com>2026-06-12 13:47:28 -0700
commitd91feb88692e81b00cd22f0125cfcd04970b4a0b (patch)
tree724b08eb4f696b4049c22a44b34a2e15a84b51ad /drivers/phy/spacemit/git@git.tavy.me:linux.git
parente43ffb69e0438cddd72aaa30898b4dc446f664f8 (diff)
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 'drivers/phy/spacemit/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions