]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: rework amdgpu_userq_wait_ioctl v4
authorChristian König <christian.koenig@amd.com>
Thu, 29 Jan 2026 11:29:26 +0000 (12:29 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 21:46:30 +0000 (17:46 -0400)
commita1371d9f0e611ef40cd31b02565e2325701c1d82
treeec3298cecc69af6c62bdc7228fd334f5ab67bb99
parent2c192b06f1e6bd9f770138a55b26c4ea04246e2f
drm/amdgpu: rework amdgpu_userq_wait_ioctl v4

Lockdep was complaining about a number of issues here. Especially lock
inversion between syncobj, dma_resv and copying things into userspace.

Rework the functionality. Split it up into multiple functions,
consistenly use memdup_array_user(), fix the lock inversions and a few
more bugs in error handling.

v2: drop the dma_fence leak fix, turned out that was actually correct,
    just not well documented. Apply some more cleanup suggestion from
    Tvrtko.
v3: rebase on already done cleanups
v4: add missing dma_fence_put() in error path.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c