AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Jonathan Kim <Jonathan.Kim@amd.com>, amd-gfx@lists.freedesktop.org
Cc: JinHuiEric.Huang@amd.com, Harish.Kasiviswanathan@amd.com
Subject: Re: [PATCH] drm/amdkfd: fix process reference drop on debug ioctl
Date: Wed, 21 Feb 2024 14:21:49 -0500	[thread overview]
Message-ID: <e2209732-771f-41da-9d83-ac696a08bee5@amd.com> (raw)
In-Reply-To: <20240221105422.1354628-1-Jonathan.Kim@amd.com>


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@amd.com>

Reviewed-by: Felix Kuehling <felix.kuehling@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;
>   	}
>   

      reply	other threads:[~2024-02-21 19:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 10:54 [PATCH] drm/amdkfd: fix process reference drop on debug ioctl Jonathan Kim
2024-02-21 19:21 ` Felix Kuehling [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2209732-771f-41da-9d83-ac696a08bee5@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Harish.Kasiviswanathan@amd.com \
    --cc=JinHuiEric.Huang@amd.com \
    --cc=Jonathan.Kim@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox