drm/amdkfd: Check for pdd drm file first in CRIU restore path
authorDavid Francis <David.Francis@amd.com>
Thu, 14 May 2026 14:31:20 +0000 (10:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 May 2026 14:40:39 +0000 (10:40 -0400)
commit2bab781dac78916c5cc8de76345a4102449267d7
treefb2e3699c64a87be71f38fb70b1c53af1e9346c1
parent1a58070fda26857a8f6acc0ab05428e60d5c6844
drm/amdkfd: Check for pdd drm file first in CRIU restore path

CRIU restore ioctls are meant to be called by CRIU with no
existing drm file. There's an error path
for if the drm file unexpectedly exists. It was positioned so
it was missing a fput(drm_file).

Do that check earlier, as soon as we have the pdd.

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c