summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-01-22 14:03:03 +0300
committerLucas Stach <l.stach@pengutronix.de>2016-01-25 16:23:49 +0300
commit339073ef77e45e87ec4cc8671b2d2328dcfd31f0 (patch)
tree012fabc9e7d0faebc58dc71851adfed2dde36933
parent23a9d5dcb6ae114733fac4757b0b154571c21129 (diff)
downloadlinux-339073ef77e45e87ec4cc8671b2d2328dcfd31f0.tar.xz
drm/etnaviv: hold object lock while getting pages for coredump
While all objects that get coredumped have an active IOVA and thus pages already populated, etnaviv_gem_get_pages() still requires the object lock to be held. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_dump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_dump.c b/drivers/gpu/drm/etnaviv/etnaviv_dump.c
index bf8fa859e8be..fd7d3e989e79 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_dump.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_dump.c
@@ -201,7 +201,9 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu)
obj = vram->object;
+ mutex_lock(&obj->lock);
pages = etnaviv_gem_get_pages(obj);
+ mutex_unlock(&obj->lock);
if (pages) {
int j;