Mesa (mesa_7_7_branch): st/xorg: Make sure we don' t overrun the fence array in block handler

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Tue Dec 29 20:09:35 PST 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: 53e314cb8057797ae75187d91836a50f61170dd7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=53e314cb8057797ae75187d91836a50f61170dd7

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Wed Dec 30 04:22:12 2009 +0100

st/xorg: Make sure we don't overrun the fence array in block handler

---

 src/gallium/state_trackers/xorg/xorg_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index bf0a23f..ee01ba0 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -467,7 +467,7 @@ static void drv_block_handler(int i, pointer blockData, pointer pTimeout,
         * quite small.  Let us get a fair way ahead of hardware before
         * throttling.
         */
-       for (j = 0; j < XORG_NR_FENCES; j++)
+       for (j = 0; j < XORG_NR_FENCES - 1; j++)
           ms->screen->fence_reference(ms->screen,
                                       &ms->fence[j],
                                       ms->fence[j+1]);



More information about the mesa-commit mailing list