summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panfrost/panfrost_gem.h
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@collabora.com>2020-11-01 18:40:16 +0100
committerBoris Brezillon <boris.brezillon@collabora.com>2020-11-03 09:21:52 +0100
commit7d2d6d01293e6d9b42a6cb410be4158571f7fe9d (patch)
tree6e84f668bfa351c9d31383e327e14202d8efaf03 /drivers/gpu/drm/panfrost/panfrost_gem.h
parentdcda7c28bff2662a44c0adaf87c08031bebeb7d8 (diff)
downloadlinux-7d2d6d01293e6d9b42a6cb410be4158571f7fe9d.tar.bz2
drm/panfrost: Fix a deadlock between the shrinker and madvise path
panfrost_ioctl_madvise() and panfrost_gem_purge() acquire the mappings and shmem locks in different orders, thus leading to a potential the mappings lock first. Fixes: bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept") Cc: <stable@vger.kernel.org> Cc: Christian Hewitt <christianshewitt@gmail.com> Reported-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201101174016.839110-1-boris.brezillon@collabora.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_gem.h')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_gem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.h b/drivers/gpu/drm/panfrost/panfrost_gem.h
index b3517ff9630c..8088d5fd8480 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem.h
+++ b/drivers/gpu/drm/panfrost/panfrost_gem.h
@@ -82,7 +82,7 @@ struct panfrost_gem_mapping *
panfrost_gem_mapping_get(struct panfrost_gem_object *bo,
struct panfrost_file_priv *priv);
void panfrost_gem_mapping_put(struct panfrost_gem_mapping *mapping);
-void panfrost_gem_teardown_mappings(struct panfrost_gem_object *bo);
+void panfrost_gem_teardown_mappings_locked(struct panfrost_gem_object *bo);
void panfrost_gem_shrinker_init(struct drm_device *dev);
void panfrost_gem_shrinker_cleanup(struct drm_device *dev);