drm/amdkfd: Fix memory leak in create_process failure
authorFelix Kuehling <felix.kuehling@amd.com>
Wed, 10 Apr 2024 19:52:10 +0000 (15:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 12 Apr 2024 04:35:49 +0000 (00:35 -0400)
commit4135899209f9f1d9a90c46ed9b582e88dd5eae0b
treec9d55564ccf4b6c71f2b0862f12182d59ac9b257
parent38caf642e547c34b27d0d5d0ce2659623edfe40c
drm/amdkfd: Fix memory leak in create_process failure

Fix memory leak due to a leaked mmget reference on an error handling
code path that is triggered when attempting to create KFD processes
while a GPU reset is in progress.

Fixes: 0ab2d7532b05 ("drm/amdkfd: prepare per-process debug enable and disable")
CC: Xiaogang Chen <xiaogang.chen@amd.com>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Tested-by: Harish Kasiviswanthan <Harish.Kasiviswanthan@amd.com>
Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process.c