diff options
author | Jonathan Kim <Jonathan.Kim@amd.com> | 2024-02-21 05:20:34 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-02-22 10:27:50 -0500 |
commit | 6f05159a0db05fe93acf2701dd1b39c690237c8e (patch) | |
tree | 201e545b6a41ba384a1f45e4c682edd6e9f2a184 /drivers/gpu/drm/amd/amdkfd | |
parent | 8f4de8f72e1e7c7e4cdd6da1ef5ff5812c525b13 (diff) | |
download | linux-stable-6f05159a0db05fe93acf2701dd1b39c690237c8e.tar.gz linux-stable-6f05159a0db05fe93acf2701dd1b39c690237c8e.tar.bz2 linux-stable-6f05159a0db05fe93acf2701dd1b39c690237c8e.zip |
drm/amdkfd: fix process reference drop on debug ioctl
Prevent dropping the KFD process reference at the end of a debug
IOCTL call where the acquired process value is an error.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 80e90fdef291..824e660283b2 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -2935,6 +2935,7 @@ static int kfd_ioctl_set_debug_trap(struct file *filep, struct kfd_process *p, v if (IS_ERR_OR_NULL(target)) { pr_debug("Cannot find process PID %i to debug\n", args->pid); r = target ? PTR_ERR(target) : -ESRCH; + target = NULL; goto out; } |