All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Gmeiner <christian.gmeiner@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: The etnaviv authors <etnaviv@lists.freedesktop.org>,
	 DRI mailing list <dri-devel@lists.freedesktop.org>,
	 Russell King <linux+etnaviv@armlinux.org.uk>,
	Sascha Hauer <kernel@pengutronix.de>,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH 8/8] drm/etnaviv: add missing MMU context put when reaping MMU mapping
Date: Thu, 26 Aug 2021 14:00:11 +0200	[thread overview]
Message-ID: <CAH9NwWcV7-bk44Ux4nLgDggDMTK5pd09OfbAXpjUx7g7OE12hA@mail.gmail.com> (raw)
In-Reply-To: <20210820201830.2005563-8-l.stach@pengutronix.de>

Am Fr., 20. Aug. 2021 um 22:18 Uhr schrieb Lucas Stach <l.stach@pengutronix.de>:
>
> When we forcefully evict a mapping from the the address space and thus the
> MMU context, the MMU context is leaked, as the mapping no longer points to
> it, so it doesn't get freed when the GEM object is destroyed. Add the
> mssing context put to fix the leak.
>
> Cc: stable@vger.kernel.org # 5.4
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Tested-by: Michael Walle <michael@walle.cc>

Series is:
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> index dab1b58006d8..9fb1a2aadbcb 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> @@ -199,6 +199,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,
>                  */
>                 list_for_each_entry_safe(m, n, &list, scan_node) {
>                         etnaviv_iommu_remove_mapping(context, m);
> +                       etnaviv_iommu_context_put(m->context);
>                         m->context = NULL;
>                         list_del_init(&m->mmu_node);
>                         list_del_init(&m->scan_node);
> --
> 2.30.2
>


-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info/privacypolicy

      reply	other threads:[~2021-08-26 12:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 20:18 [PATCH 1/8] drm/etnaviv: return context from etnaviv_iommu_context_get Lucas Stach
2021-08-20 20:18 ` [PATCH 2/8] drm/etnaviv: put submit prev MMU context when it exists Lucas Stach
2021-08-20 20:18 ` [PATCH 3/8] drm/etnaviv: stop abusing mmu_context as FE running marker Lucas Stach
2021-08-20 20:18 ` [PATCH 4/8] drm/etnaviv: keep MMU context across runtime suspend/resume Lucas Stach
2021-08-20 20:18 ` [PATCH 5/8] drm/etnaviv: exec and MMU state is lost when resetting the GPU Lucas Stach
2021-08-20 20:18 ` [PATCH 6/8] drm/etnaviv: fix MMU context leak on GPU reset Lucas Stach
2021-08-20 20:18 ` [PATCH 7/8] drm/etnaviv: reference MMU context when setting up hardware state Lucas Stach
2021-08-24  7:24   ` Christian Gmeiner
2021-08-24  7:54     ` Lucas Stach
2021-08-24  8:51       ` Christian Gmeiner
2021-08-20 20:18 ` [PATCH 8/8] drm/etnaviv: add missing MMU context put when reaping MMU mapping Lucas Stach
2021-08-26 12:00   ` Christian Gmeiner [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=CAH9NwWcV7-bk44Ux4nLgDggDMTK5pd09OfbAXpjUx7g7OE12hA@mail.gmail.com \
    --to=christian.gmeiner@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux+etnaviv@armlinux.org.uk \
    --cc=patchwork-lst@pengutronix.de \
    /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.