public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATH] i915: Read outside array bounds
@ 2009-07-25 22:50 Roel Kluin
  2009-07-28 21:50 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2009-07-25 22:50 UTC (permalink / raw)
  To: airlied, pavel, dri-devel, linux-pm, Andrew Morton

dev_priv->saveSWF1 is a 16 element array, but this reads up to index 22

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
save_state does not do this addition, can it be removed? please review.

diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 9e1d16e..1d04e19 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -598,7 +598,7 @@ int i915_restore_state(struct drm_device *dev)
 
 	for (i = 0; i < 16; i++) {
 		I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]);
-		I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]);
+		I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i]);
 	}
 	for (i = 0; i < 3; i++)
 		I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-02 23:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 22:50 [PATH] i915: Read outside array bounds Roel Kluin
2009-07-28 21:50 ` Andrew Morton
2009-07-29 21:06   ` Rafael J. Wysocki
     [not found]   ` <200907292306.15195.rjw@sisk.pl>
2009-08-02 23:45     ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox