diff options
author | Brian Masney <masneyb@onstation.org> | 2019-05-14 02:41:05 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-05-14 20:53:58 +0300 |
commit | 90f94660e53189755676543954101de78c26253b (patch) | |
tree | e4054d66113152fc770d87ca540cf2c888a64a02 /drivers/gpu/drm | |
parent | e2f597a20470d7dfeca49c3d45cb8a7e46d3cf66 (diff) | |
download | linux-90f94660e53189755676543954101de78c26253b.tar.xz |
drm/msm: correct attempted NULL pointer dereference in debugfs
msm_gem_describe() would attempt to dereference a NULL pointer via the
address space pointer when no IOMMU is present. Correct this by adding
the appropriate check.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Fixes: 575f0485508b ("drm/msm: Clean up and enhance the output of the 'gem' debugfs node")
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190513234105.7531-2-masneyb@onstation.org
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 31d5a744d84f..35f55dd25994 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -803,7 +803,8 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m) seq_puts(m, " vmas:"); list_for_each_entry(vma, &msm_obj->vmas, list) - seq_printf(m, " [%s: %08llx,%s,inuse=%d]", vma->aspace->name, + seq_printf(m, " [%s: %08llx,%s,inuse=%d]", + vma->aspace != NULL ? vma->aspace->name : NULL, vma->iova, vma->mapped ? "mapped" : "unmapped", vma->inuse); |