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: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
b705120e41
commit
8e934dbf26
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue