summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2026-09-29 20:34:32 +0100
committerAlex Deucher <alexander.deucher@amd.com>2026-10-07 12:12:19 -0400
commitf9c41782e42899d8d882b0d547db40c882205799 (patch)
treecc1c9372bf9a99da9f8c2728bb4ec17e4cb84d46 /scripts/basic/split-include.c
parent624a5a158c2a49f07edba7f8653eeecca114921f (diff)
downloadlinux-f9c41782e42899d8d882b0d547db40c882205799.tar.gz
linux-f9c41782e42899d8d882b0d547db40c882205799.zip
drm/amdgpu: Fix NPA-REVOKE racing an in-flight UALink import
The exporter records an importer when it answers NPA-REQ, so it can send NPA-REVOKE as soon as the BO is freed, before the importer has finished building the dma-buf for that handle. The revoke handler assumes a fully imported node: it dereferences imp_xa_node->dmabuf, which is still NULL until the import completes, and drops the xarray reference the importing thread still relies on. The importer then links the node and marks it READY regardless, so the node can be freed while still on the per-remote list. Only tear down a node that is READY. A PENDING node is still being imported and nothing has been handed to user-space yet, so only mark it for teardown and send NPA-RELEASE. The importer checks for teardown under the xarray lock before linking the node and marking it READY, and unwinds otherwise. As NPA-REVOKE always follows NPA-RSP, a revoke that finds the node NOT_READY is stale, and one that finds it in teardown hits a node that is already being released, so both are ignored. Fixes: 7cc82cd90d35 ("drm/amdgpu: Implement mechanism to revoke exported memory") Assisted-by: LLM Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Mukul Joshi <mukul.joshi@amd.com> Signed-off-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions