summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-03-05 23:02:32 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-03-05 23:02:32 +0000
commit1e5081a26084316fc24b69acade1cfea6c4c3332 (patch)
treebc57a9739e77faae574773369d9a733ca2a4f067 /sys/dev/pci
parent8a6a6ad97affce852c3026979d550225e62e9856 (diff)
Additional paranoia for the indirect buffer checking.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/radeon_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon_state.c b/sys/dev/pci/drm/radeon_state.c
index d3f4bcc9f28..f4418c25693 100644
--- a/sys/dev/pci/drm/radeon_state.c
+++ b/sys/dev/pci/drm/radeon_state.c
@@ -1220,7 +1220,7 @@ radeon_cp_dispatch_indirect(struct drm_device *dev, struct drm_buf *buf,
RING_LOCALS;
DRM_DEBUG("buf=%d s=0x%x e=0x%x\n", buf->idx, start, end);
- if (start != end) {
+ if (start != end && start < end) {
int offset = (dev_priv->gart_buffers_offset
+ buf->offset + start);
int dwords = (end - start + 3) / sizeof(u32);