Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
	intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Bart Van Assche" <bvanassche@acm.org>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH] drm/pagemap: Unlock cache->lock before freeing it
Date: Tue, 24 Feb 2026 14:39:17 +0100	[thread overview]
Message-ID: <8001c470-ca46-4390-be3c-f078b5fce498@linux.intel.com> (raw)
In-Reply-To: <20260223222937.2008492-1-matthew.brost@intel.com>

Hey,

Den 2026-02-23 kl. 23:29, skrev Matthew Brost:
> From: Bart Van Assche <bvanassche@acm.org>
> 
> Although freeing a spinlock without unlocking it is fine, this confuses
> static analyzers. Hence this patch.
> 
> Fixes: 77f14f2f2d73 ("drm/pagemap: Add a drm_pagemap cache and shrinker")
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
>  drivers/gpu/drm/drm_pagemap_util.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_pagemap_util.c b/drivers/gpu/drm/drm_pagemap_util.c
> index 14ddb948a32e..50cb5f9cdac5 100644
> --- a/drivers/gpu/drm/drm_pagemap_util.c
> +++ b/drivers/gpu/drm/drm_pagemap_util.c
> @@ -74,6 +74,8 @@ static void drm_pagemap_cache_fini(void *arg)
>  		cache->dpagemap = NULL;
>  		spin_unlock(&cache->lock);
>  		drm_pagemap_destroy(dpagemap, false);
> +	} else {
> +		spin_unlock(&cache->lock);
>  	}
>  
>  out:

What about this idea?

https://lore.kernel.org/all/791538fb-56e5-4ca5-9484-1180cc928a70@linux.intel.com/

  parent reply	other threads:[~2026-02-24 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 22:29 [PATCH] drm/pagemap: Unlock cache->lock before freeing it Matthew Brost
2026-02-23 22:36 ` ✓ CI.KUnit: success for " Patchwork
2026-02-24 13:39 ` Maarten Lankhorst [this message]
2026-02-24 15:52   ` [PATCH] " Matthew Brost

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=8001c470-ca46-4390-be3c-f078b5fce498@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=bvanassche@acm.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tzimmermann@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox