diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-24 12:34:00 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-24 18:28:29 +0000 |
commit | 8e934dbf264418afe4d1dff34ce074ecc14280db (patch) | |
tree | 6fcbbafc58a1f444b065905a2b3a3e5427cc6c92 /drivers/gpu | |
parent | b705120e4198315f4ae043de06c62f65e0851fd3 (diff) | |
download | blackbird-op-linux-8e934dbf264418afe4d1dff34ce074ecc14280db.tar.gz blackbird-op-linux-8e934dbf264418afe4d1dff34ce074ecc14280db.zip |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 4b5a35c88bec..062f353497e6 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -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); |