[PATCH] drm/amdkfd: fix process reference drop on debug ioctl
Felix Kuehling
felix.kuehling at amd.com
Wed Feb 21 19:21:49 UTC 2024
On 2024-02-21 05:54, Jonathan Kim wrote:
> 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 at amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
>
More information about the amd-gfx
mailing list