Commit 8e934dbf authored by Chris Wilson's avatar Chris Wilson

drm/i915: Prevent uninitialised reads during error state capture

error_bo and pinned_bo could be used uninitialised if there were no
active buffers.

Caught by kmemcheck.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent b705120e
......@@ -846,6 +846,8 @@ static void i915_capture_error_state(struct drm_device *dev)
i++;
error->pinned_bo_count = i - error->active_bo_count;
error->active_bo = NULL;
error->pinned_bo = NULL;
if (i) {
error->active_bo = kmalloc(sizeof(*error->active_bo)*i,
GFP_ATOMIC);
......
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