All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: Melissa Wen <mwen@igalia.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/vgem: add missing mutex_destroy
Date: Thu, 2 Feb 2023 15:36:15 +0100	[thread overview]
Message-ID: <20230202143615.GA2637512@linux.intel.com> (raw)
In-Reply-To: <20230202125517.427976-1-mcanal@igalia.com>

On Thu, Feb 02, 2023 at 09:55:17AM -0300, Maíra Canal wrote:
> vgem_fence_open() instantiates a mutex for a particular fence
> instance, but never destroys it by calling mutex_destroy() in
> vgem_fence_close().
> 
> So, add the missing mutex_destroy() to guarantee proper resource
> destruction.
> 
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>

> ---
>  drivers/gpu/drm/vgem/vgem_fence.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c
> index c2a879734d40..e15754178395 100644
> --- a/drivers/gpu/drm/vgem/vgem_fence.c
> +++ b/drivers/gpu/drm/vgem/vgem_fence.c
> @@ -249,4 +249,5 @@ void vgem_fence_close(struct vgem_file *vfile)
>  {
>  	idr_for_each(&vfile->fence_idr, __vgem_fence_idr_fini, vfile);
>  	idr_destroy(&vfile->fence_idr);
> +	mutex_destroy(&vfile->fence_mutex);
>  }
> -- 
> 2.39.1
> 

      reply	other threads:[~2023-02-02 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 12:55 [PATCH] drm/vgem: add missing mutex_destroy Maíra Canal
2023-02-02 14:36 ` Stanislaw Gruszka [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=20230202143615.GA2637512@linux.intel.com \
    --to=stanislaw.gruszka@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mcanal@igalia.com \
    --cc=mwen@igalia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.