projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b705120
)
drm/i915: Prevent uninitialised reads during error state capture
author
Chris Wilson
<chris@chris-wilson.co.uk>
Mon, 24 Jan 2011 12:34:00 +0000
(12:34 +0000)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Mon, 24 Jan 2011 18:28:29 +0000
(18:28 +0000)
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>
drivers/gpu/drm/i915/i915_irq.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_irq.c
b/drivers/gpu/drm/i915/i915_irq.c
index 4b5a35c88bec45b600a63ceb3537a211c89e3410..062f353497e6ee6add30b8fd3469da200fcba7f6 100644
(file)
--- 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);