All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Asahi Lina <lina@asahilina.net>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: "Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	asahi@lists.linux.dev
Subject: Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()
Date: Fri, 10 Feb 2023 13:38:22 +0100	[thread overview]
Message-ID: <bee5d455-3e15-427a-d7a6-f633a748f4c3@redhat.com> (raw)
In-Reply-To: <a1cd8c74-98f4-bff0-0344-cbece787c6e8@redhat.com>

On 2/6/23 19:47, Javier Martinez Canillas wrote:
> Hello Lina,
> 
> On 2/5/23 13:51, Asahi Lina wrote:
>> Other functions touching shmem->sgt take the pages lock, so do that here
>> too. drm_gem_shmem_get_pages() & co take the same lock, so move to the
>> _locked() variants to avoid recursive locking.
>>
>> Discovered while auditing locking to write the Rust abstractions.
>>
>> Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects")
>> Fixes: 4fa3d66f132b ("drm/shmem: Do dma_unmap_sg before purging pages")
>> Signed-off-by: Asahi Lina <lina@asahilina.net>
>> ---
> 
> Good catch. The patch looks good to me.
> 
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> 

Pushed this to drm-misc (drm-misc-next). Thanks!

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


WARNING: multiple messages have this Message-ID (diff)
From: Javier Martinez Canillas <javierm@redhat.com>
To: Asahi Lina <lina@asahilina.net>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"Noralf Trønnes" <noralf@tronnes.org>,
	asahi@lists.linux.dev, "Alyssa Rosenzweig" <alyssa@rosenzweig.io>
Subject: Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()
Date: Fri, 10 Feb 2023 13:38:22 +0100	[thread overview]
Message-ID: <bee5d455-3e15-427a-d7a6-f633a748f4c3@redhat.com> (raw)
In-Reply-To: <a1cd8c74-98f4-bff0-0344-cbece787c6e8@redhat.com>

On 2/6/23 19:47, Javier Martinez Canillas wrote:
> Hello Lina,
> 
> On 2/5/23 13:51, Asahi Lina wrote:
>> Other functions touching shmem->sgt take the pages lock, so do that here
>> too. drm_gem_shmem_get_pages() & co take the same lock, so move to the
>> _locked() variants to avoid recursive locking.
>>
>> Discovered while auditing locking to write the Rust abstractions.
>>
>> Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects")
>> Fixes: 4fa3d66f132b ("drm/shmem: Do dma_unmap_sg before purging pages")
>> Signed-off-by: Asahi Lina <lina@asahilina.net>
>> ---
> 
> Good catch. The patch looks good to me.
> 
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> 

Pushed this to drm-misc (drm-misc-next). Thanks!

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  parent reply	other threads:[~2023-02-10 12:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 12:51 [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt() Asahi Lina
2023-02-05 12:51 ` Asahi Lina
2023-02-06 18:47 ` Javier Martinez Canillas
2023-02-06 18:47   ` Javier Martinez Canillas
2023-02-07 10:33   ` Asahi Lina
2023-02-07 10:33     ` Asahi Lina
2023-02-07 10:43     ` Javier Martinez Canillas
2023-02-07 10:43       ` Javier Martinez Canillas
2023-02-10 12:38   ` Javier Martinez Canillas [this message]
2023-02-10 12:38     ` Javier Martinez Canillas
2023-02-07 11:29 ` Thomas Zimmermann
2023-02-07 11:29   ` Thomas Zimmermann
2023-02-07 23:34   ` Asahi Lina
2023-02-07 23:34     ` Asahi Lina
2023-02-25 21:51 ` Dmitry Osipenko
2023-02-25 21:51   ` Dmitry Osipenko
2023-02-27  7:45   ` Thomas Zimmermann
2023-02-27  7:45     ` Thomas Zimmermann
2023-02-27  7:55     ` Asahi Lina
2023-02-27  7:55       ` Asahi Lina
2023-02-27  8:04       ` Thomas Zimmermann
2023-02-27  8:04         ` Thomas Zimmermann
2023-02-27  9:07         ` Asahi Lina
2023-02-27  9:07           ` Asahi Lina
2023-02-27  9:20           ` Thomas Zimmermann
2023-02-27  9:20             ` Thomas Zimmermann

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=bee5d455-3e15-427a-d7a6-f633a748f4c3@redhat.com \
    --to=javierm@redhat.com \
    --cc=airlied@gmail.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lina@asahilina.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=noralf@tronnes.org \
    --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 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.