drm/amdkfd: Create file descriptor after client is added to smi_clients list
authorLee Jones <lee.jones@linaro.org>
Thu, 31 Mar 2022 12:21:17 +0000 (13:21 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 1 Apr 2022 03:05:55 +0000 (23:05 -0400)
commite45422695c196dbc665a95526c85ff4b8752aff2
treec87e5d0910440627855a8e84c18e224765f64464
parentcf8cc382aa7c60f25386a8515b6a5e74aef9d0aa
drm/amdkfd: Create file descriptor after client is added to smi_clients list

This ensures userspace cannot prematurely clean-up the client before
it is fully initialised which has been proven to cause issues in the
past.

Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c