linux/drivers/gpu/drm/etnaviv
Lucas Stach 12cfb0c1c2 drm/etnaviv: reap idle mapping if it doesn't match the softpin address
commit 332f847212 upstream.

When a idle BO, which is held open by another process, gets freed by
userspace and subsequently referenced again by e.g. importing it again,
userspace may assign a different softpin VA than the last time around.
As the kernel GEM object still exists, we likely have a idle mapping
with the old VA still cached, if it hasn't been reaped in the meantime.

As the context matches, we then simply try to resurrect this mapping by
increasing the refcount. As the VA in this mapping does not match the
new softpin address, we consequently fail the otherwise valid submit.
Instead of failing, reap the idle mapping.

Cc: stable@vger.kernel.org # 5.19
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-07 11:11:57 +01:00
..
cmdstream.xml.h
common.xml.h
etnaviv_buffer.c
etnaviv_cmd_parser.c
etnaviv_cmdbuf.c
etnaviv_cmdbuf.h
etnaviv_drv.c drm/etnaviv: Make use of the helper component_compare_of/dev_name 2022-02-25 12:16:12 +01:00
etnaviv_drv.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
etnaviv_dump.c
etnaviv_dump.h
etnaviv_gem_prime.c dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
etnaviv_gem_submit.c drm/etnaviv: avoid cleaning up sched_job when submit succeeded 2022-05-04 14:09:34 +02:00
etnaviv_gem.c drm/etnaviv: reap idle mapping if it doesn't match the softpin address 2023-01-07 11:11:57 +01:00
etnaviv_gem.h drm/etnaviv: Use scheduler dependency handling 2022-04-04 16:45:49 +02:00
etnaviv_gpu.c drm/etnaviv: add missing quirks for GC300 2022-12-31 13:32:58 +01:00
etnaviv_gpu.h drm/etnaviv: consider completed fence seqno in hang check 2021-12-23 20:21:33 +01:00
etnaviv_hwdb.c
etnaviv_iommu_v2.c
etnaviv_iommu.c
etnaviv_mmu.c drm/etnaviv: move idle mapping reaping into separate function 2023-01-07 11:11:57 +01:00
etnaviv_mmu.h drm/etnaviv: move idle mapping reaping into separate function 2023-01-07 11:11:57 +01:00
etnaviv_perfmon.c
etnaviv_perfmon.h
etnaviv_sched.c drm/etnaviv: Use scheduler dependency handling 2022-04-04 16:45:49 +02:00
etnaviv_sched.h drm/etnaviv: Use scheduler dependency handling 2022-04-04 16:45:49 +02:00
Kconfig
Makefile
state_3d.xml.h
state_blt.xml.h
state_hi.xml.h
state.xml.h