Commit b77f6997 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Avoid NULL ctx->obj dereference in debugfs/i915_context_info

In commit 691e6415
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 9 09:07:36 2014 +0100

    drm/i915: Always use kref tracking for all contexts.

we populated fake contexts on all platforms. These were identical to the
full hardware context tracking structs, except for the ctx->obj used to
store the hardware state. However, there remained one place where we
assumed that if a context existed, it would have an object associated
with it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77717
Testcase: igt/drv_suspend/debugfs-reader
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a225f079
...@@ -1698,6 +1698,9 @@ static int i915_context_status(struct seq_file *m, void *unused) ...@@ -1698,6 +1698,9 @@ static int i915_context_status(struct seq_file *m, void *unused)
} }
list_for_each_entry(ctx, &dev_priv->context_list, link) { list_for_each_entry(ctx, &dev_priv->context_list, link) {
if (ctx->obj == NULL)
continue;
seq_puts(m, "HW context "); seq_puts(m, "HW context ");
describe_ctx(m, ctx); describe_ctx(m, ctx);
for_each_ring(ring, dev_priv, i) for_each_ring(ring, dev_priv, i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment