]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panfrost: Fix a deadlock between the shrinker and madvise path
authorBoris Brezillon <boris.brezillon@collabora.com>
Sun, 1 Nov 2020 17:40:16 +0000 (18:40 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 3 Nov 2020 08:21:52 +0000 (09:21 +0100)
commitec5ad8523b4f3a2ea8b1d98131fcf89d232f4fec
tree6e84f668bfa351c9d31383e327e14202d8efaf03
parent4d394e358779faf6fbfaee4912ce2a9df236fb78
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: d84adfc1b3f3 ("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
drivers/gpu/drm/panfrost/panfrost_gem.c
drivers/gpu/drm/panfrost/panfrost_gem.h
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c