diff options
author | Daniel Vetter <[email protected]> | 2018-05-25 19:39:24 +0300 |
---|---|---|
committer | Tomi Valkeinen <[email protected]> | 2018-06-28 13:41:05 +0300 |
commit | 5117bd898e8c0a31e8ab3a9b8523aecf0706e997 (patch) | |
tree | 5003d035c44116983a819d10d3a93ffab46ad86e /drivers/gpu/drm/omapdrm/omap_debugfs.c | |
parent | 3cbd0c587b129beaefb1405bbe43831e6bc9461e (diff) |
drm/omap: gem: Fix mm_list locking
- None of the list walkings where protected.
- Switch to a mutex since the list walking at device resume time can
sleep when pinning buffers through the tiler.
Only thing we need to be careful with here is that while we walk the
list we can't unreference any gem objects, since the final unref would
result in a recursive deadlock. But the only functions that walk the
list is the device resume and debugfs dumping, so all safe.
Signed-off-by: Daniel Vetter <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_debugfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c index 95ade441caa8..91cf043f2b6b 100644 --- a/drivers/gpu/drm/omapdrm/omap_debugfs.c +++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c @@ -32,7 +32,9 @@ static int gem_show(struct seq_file *m, void *arg) struct omap_drm_private *priv = dev->dev_private; seq_printf(m, "All Objects:\n"); + mutex_lock(&priv->list_lock); omap_gem_describe_objects(&priv->obj_list, m); + mutex_unlock(&priv->list_lock); return 0; } |