etnaviv: Add lock around pending_ctx
authorMarek Vasut <marex@denx.de>
Tue, 21 Jul 2020 14:21:14 +0000 (16:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Aug 2020 09:58:10 +0000 (09:58 +0000)
commit60975ebe58ddb05beebbdd3850dc9d866aee5420
tree75d789f0997ea5fac60bbde193e0ce5415e5a770
parentda660c90bf94527c3d54a9a59e7f7df935480479
etnaviv: Add lock around pending_ctx

The content of rsc->pending_ctx could be changed from multiple contexts
and thus from multiple threads. The per-context lock is not sufficient
to protect this list. Add per-resource lock to protect this list.

Fixes: e5cc66dfad0 ("etnaviv: Rework locking")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6454>
src/gallium/drivers/etnaviv/etnaviv_context.c
src/gallium/drivers/etnaviv/etnaviv_resource.c
src/gallium/drivers/etnaviv/etnaviv_resource.h
src/gallium/drivers/etnaviv/etnaviv_transfer.c