Skip to content
Unverified Commit ddddedaa authored by Asahi Lina's avatar Asahi Lina Committed by Javier Martinez Canillas
Browse files

drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

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: 2194a63a ("drm: Add library for shmem backed GEM objects")
Fixes: 4fa3d66f

 ("drm/shmem: Do dma_unmap_sg before purging pages")
Signed-off-by: default avatarAsahi Lina <lina@asahilina.net>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230205125124.2260-1-lina@asahilina.net
(cherry picked from commit aa8c85af

)
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
parent 38b2d8ef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment